/*****************************************************************
 *                                                               *
 * Xors3d Engine header file for C++, (c) 2012 XorsTeam          *
 * www:    http://xors3d.com                                     *
 * e-mail: support@xors3d.com                                    *
 *                                                               *
 *****************************************************************/

#ifndef _XORS3D_H_
#define _XORS3D_H_

// standard headers
#include <windows.h>

// Delaration & call macros
#define X3DDECL extern "C" __declspec(dllexport)
#define X3DCALL _stdcall

// Object handle typedef
typedef int Handle;

// Log levels
const int LOG_NO            = 5;
const int LOG_FATAL         = 4;
const int LOG_ERROR         = 3;
const int LOG_WARNING       = 2;
const int LOG_MESSAGE       = 1;
const int LOG_INFO          = 0;

// Log targets
const int LOG_HTML             = 1;
const int LOG_COUT             = 2;
const int LOG_STRING           = 4;

// Skinning types
const int SKIN_SOFTWARE = 2;
const int SKIN_HARDWARE = 1;

// Light sources types
const int LIGHT_DIRECTIONAL = 1;
const int LIGHT_POINT       = 2;
const int LIGHT_SPOT        = 3;

// Texture filtering
const int TF_NONE           = 0;
const int TF_POINT          = 1;
const int TF_LINEAR         = 2;
const int TF_ANISOTROPIC    = 3;
const int TF_ANISOTROPICX4  = 4;
const int TF_ANISOTROPICX8  = 5;
const int TF_ANISOTROPICX16 = 6;

// PixelShader versions
const int PS_1_1 = 0;
const int PS_1_2 = 1;
const int PS_1_3 = 2;
const int PS_1_4 = 3;
const int PS_2_0 = 4;
const int PS_3_0 = 5;

// VertexShader versions
const int VS_1_1 = 0;
const int VS_2_0 = 1;
const int VS_3_0 = 2;

// Matrix semantics
const int WORLD                         = 0;
const int WORLDVIEWPROJ                 = 1;
const int VIEWPROJ                      = 2;
const int VIEW                          = 3;
const int PROJ                          = 4;
const int WORLDVIEW                     = 5;
const int VIEWINVERSE                   = 6;
const int WORLDINVERSETRANSPOSE         = 15;
const int WORLDINVERSE                  = 16;
const int WORLDTRANSPOSE                = 17;
const int VIEWPROJINVERSE               = 18;
const int VIEWPROJINVERSETRANSPOSE      = 19;
const int VIEWTRANSPOSE                 = 20;
const int VIEWINVRSETRANSPOSE           = 21;
const int PROJINVERSE                   = 22;
const int PROJTRANSPOSE                 = 23;
const int PROJINVRSETRANSPOSE           = 24;
const int WORLDVIEWPROJTRANSPOSE        = 25;
const int WORLDVIEWPROJINVERSE          = 26;
const int WORLDVIEWPROJINVERSETRANSPOSE = 27;
const int WORLDVIEWTRANSPOSE            = 28;
const int WORLDVIEWINVERSE              = 29;
const int WORLDVIEWINVERSETRANSPOSE     = 30;

// Antialiasing types
const int AANONE      = 0;
const int AA2SAMPLES  = 1;
const int AA3SAMPLES  = 2;
const int AA4SAMPLES  = 3;
const int AA5SAMPLES  = 4;
const int AA6SAMPLES  = 5;
const int AA7SAMPLES  = 6;
const int AA8SAMPLES  = 7;
const int AA9SAMPLES  = 8;
const int AA10SAMPLES = 9;
const int AA11SAMPLES = 10;
const int AA12SAMPLES = 11;
const int AA13SAMPLES = 12;
const int AA14SAMPLES = 13;
const int AA15SAMPLES = 14;
const int AA16SAMPLES = 15;

// Camera fog mode
const int FOG_NONE     = 0;
const int FOG_LINEAR   = 1;

// Camera projection mode
const int PROJ_DISABLE      = 0;
const int PROJ_PERSPECTIVE	= 1;
const int PROJ_ORTHOGRAPHIC = 2;

// Entity FX flags
const int FX_NOTHING        = 0;
const int FX_FULLBRIGHT     = 1;
const int FX_VERTEXCOLOR    = 2;
const int FX_FLATSHADED     = 4;
const int FX_DISABLEFOG     = 8;
const int FX_DISABLECULLING = 16;
const int FX_NOALPHABLEND   = 32;

// Entity blending modes
const int BLEND_ALPHA       = 1;
const int BLEND_MULTIPLY    = 2;
const int BLEND_ADD         = 3;
const int BLEND_PUREADD     = 4;

// Compare functions
const int CMP_NEVER         = 1;
const int CMP_LESS          = 2;
const int CMP_EQUAL         = 3;
const int CMP_LESSEQUAL     = 4;
const int CMP_GREATER       = 5;
const int CMP_NOTEQUAL      = 6;
const int CMP_GREATEREQUAL  = 7;
const int CMP_ALWAYS        = 8;

// Axis
const int AXIS_X    = 1;
const int AXIS_Y    = 2;
const int AXIS_Z    = 3;

// Texture loading flags
const int FLAGS_COLOR             = 1;
const int FLAGS_ALPHA             = 2;
const int FLAGS_MASKED            = 4;
const int FLAGS_MIPMAPPED         = 8;
const int FLAGS_CLAMPU            = 16;
const int FLAGS_CLAMPV            = 32;
const int FLAGS_SPHERICALENVMAP   = 64;
const int FLAGS_CUBICENVMAP       = 128;
const int FLAGS_R32F              = 256;
const int FLAGS_SKIPCACHE         = 512;
const int FLAGS_VOLUMETEXTURE     = 1024;
const int FLAGS_ARBG16F           = 2048;
const int FLAGS_ARBG32F           = 4096;

// Texture blending modes
const int TEXBLEND_NONE          = 0;
const int TEXBLEND_ALPHA         = 1;
const int TEXBLEND_MULTIPLY      = 2;
const int TEXBLEND_ADD           = 3;
const int TEXBLEND_DOT3          = 4;
const int TEXBLEND_LIGHTMAP      = 5;
const int TEXBLEND_SEPARATEALPHA = 6;

// Cube map faces
const int FACE_LEFT     = 0;
const int FACE_FORWARD  = 1;
const int FACE_RIGHT    = 2;
const int FACE_BACKWARD = 3;
const int FACE_UP       = 4;
const int FACE_DOWN     = 5;

// Entity animation types
const int ANIMATION_STOP      = 0;
const int ANIMATION_LOOP      = 1;
const int ANIMATION_PINGPONG  = 2;
const int ANIMATION_ONE       = 3;

// Collision types
const int SPHERETOSPHERE  = 1;
const int SPHERETOBOX     = 3;
const int SPHERETOTRIMESH = 2;

// Collision respones types
const int RESPONSE_STOP             = 1;
const int RESPONSE_SLIDING          = 2;
const int RESPONSE_SLIDING_DOWNLOCK = 3;

// Entity picking modes
const int PICK_NONE     = 0;
const int PICK_SPHERE   = 1;
const int PICK_TRIMESH  = 2;
const int PICK_BOX      = 3;

// Sprite view modes
const int SPRITE_FIXED    = 1;
const int SPRITE_FREE     = 2;
const int SPRITE_FREEROLL = 3;
const int SPRITE_FIXEDYAW = 4;

// Joystick types
const int JOY_NONE    = 0;
const int JOY_DIGITAL = 1;
const int JOY_ANALOG  = 2;

// Cubemap rendering modes
const int CUBEMAP_SPECULAR   = 1;
const int CUBEMAP_DIFFUSE    = 2;
const int CUBEMAP_REFRACTION = 3;

// Shadow's blur levels
const int SHADOWS_BLUR_NONE = 0;
const int SHADOWS_BLUR_3    = 1;
const int SHADOWS_BLUR_5    = 2;
const int SHADOWS_BLUR_7    = 3;
const int SHADOWS_BLUR_11   = 4;
const int SHADOWS_BLUR_13   = 5;


// primitives types
const int PRIMITIVE_POINTLIST     = 1;
const int PRIMITIVE_LINELIST      = 2;
const int PRIMITIVE_LINESTRIP     = 3;
const int PRIMITIVE_TRIANGLELIST  = 4;
const int PRIMITIVE_TRIANGLESTRIP = 5;
const int PRIMITIVE_TRIANGLEFAN   = 6;

// line separator types
const int LS_NUL	= 0;
const int LS_CR		= 1;
const int LS_LF		= 2;
const int LS_CRLF	= 3;

// physics: joint types
const int JOINT_POINT2POINT	= 0;
const int JOINT_6DOF		= 1;
const int JOINT_6DOFSPRING	= 2;
const int JOINT_HINGE		= 3;

// physics: debug drawer modes
const int PXDD_NO           = 0;
const int PXDD_WIREFRAME    = 1;
const int PXDD_AABB         = 2;
const int PXDD_CONTACTS     = 4;
const int PXDD_JOINTS       = 8;
const int PXDD_JOINT_LIMITS = 16;
const int PXDD_NO_AXIS      = 32;

// physics: ray casting modes
const int PXRC_SINGLE   = 0;
const int PXRC_MULTIPLE = 1;

// 3dlines commands
X3DDECL Handle X3DCALL xCreateLine3D(float fromX, float fromY, float fromZ, float toX, float toY, float toZ, int red = 255, int green = 255, int blue = 255, int alpha = 255, bool useZBuffer = true);
X3DDECL void X3DCALL xLine3DOrigin(Handle line3d, float x, float y, float z, bool isGlobal = false);
X3DDECL void X3DCALL xLine3DAddNode(Handle line3d, float x, float y, float z, bool isGlobal = false);
X3DDECL void X3DCALL xLine3DColor(Handle line3d, int red, int green, int blue, int alpha);
X3DDECL void X3DCALL xLine3DUseZBuffer(Handle line3d, bool state);
X3DDECL float X3DCALL xLine3DOriginX(Handle line3d, bool isGlobal = false);
X3DDECL float X3DCALL xLine3DOriginY(Handle line3d, bool isGlobal = false);
X3DDECL float X3DCALL xLine3DOriginZ(Handle line3d, bool isGlobal = false);
X3DDECL int X3DCALL xLine3DNodesCount(Handle line3d);
X3DDECL void X3DCALL xLine3DNodePosition(Handle line3d, int index, float x, float y, float z, bool isGlobal = false);
X3DDECL float X3DCALL xLine3DNodeX(Handle line3d, int index, bool isGlobal = false);
X3DDECL float X3DCALL xLine3DNodeY(Handle line3d, int index, bool isGlobal = false);
X3DDECL float X3DCALL xLine3DNodeZ(Handle line3d, int index, bool isGlobal = false);
X3DDECL int X3DCALL xLine3DRed(Handle line3d);
X3DDECL int X3DCALL xLine3DGreen(Handle line3d);
X3DDECL int X3DCALL xLine3DBlue(Handle line3d);
X3DDECL int X3DCALL xLine3DAlpha(Handle line3d);
X3DDECL int X3DCALL xGetLine3DUseZBuffer(Handle line3d);
X3DDECL void X3DCALL xDeleteLine3DNode(Handle line3d, int index);
X3DDECL void X3DCALL xClearLine3D(Handle line3d);

// brushes commands
X3DDECL Handle X3DCALL xLoadBrush(const char * path, int flags = 9, float xScale = 1.0f, float yScale = 1.0f);
X3DDECL Handle X3DCALL xCreateBrush(float red = 255.0f, float green = 255.0f, float blue = 255.0f);
X3DDECL void X3DCALL xFreeBrush(Handle brush);
X3DDECL Handle X3DCALL xGetBrushTexture(Handle brush, int index = 0);
X3DDECL void X3DCALL xBrushColor(Handle brush, int red, int green, int blue);
X3DDECL void X3DCALL xBrushAlpha(Handle brush, float alpha);
X3DDECL void X3DCALL xBrushShininess(Handle brush, float shininess);
X3DDECL void X3DCALL xBrushBlend(Handle brush, int blend);
X3DDECL void X3DCALL xBrushFX(Handle brush, int FX);
X3DDECL void X3DCALL xBrushTexture(Handle brush, Handle texture, int frame = 0, int index = 0);
X3DDECL const char * X3DCALL xGetBrushName(Handle brush);
X3DDECL void X3DCALL xBrushName(Handle brush, const char * name);
X3DDECL float X3DCALL xGetBrushAlpha(Handle brush);
X3DDECL int X3DCALL xGetBrushBlend(Handle brush);
X3DDECL int X3DCALL xGetBrushRed(Handle brush);
X3DDECL int X3DCALL xGetBrushGreen(Handle brush);
X3DDECL int X3DCALL xGetBrushBlue(Handle brush);
X3DDECL int X3DCALL xGetBrushFX(Handle brush);
X3DDECL float X3DCALL xGetBrushShininess(Handle brush);

// cameras commands
X3DDECL void X3DCALL xCameraFogMode(Handle camera, int mode);
X3DDECL void X3DCALL xCameraFogColor(Handle camera, int red, int green, int blue);
X3DDECL void X3DCALL xCameraFogRange(Handle camera, float nearRange, float farRange);
X3DDECL void X3DCALL xCameraClsColor(Handle camera, int red, int green, int blue, int alpha = 255);
X3DDECL void X3DCALL xCameraProjMode(Handle camera, int mode);
X3DDECL void X3DCALL xCameraClsMode(Handle camera, int clearColor, int clearZBuffer);
X3DDECL int X3DCALL xSphereInFrustum(Handle camera, float x, float y, float z, float radii);
X3DDECL void X3DCALL xCameraClipPlane(Handle camera, int index, bool enabled, float a, float b, float c, float d);
X3DDECL void X3DCALL xCameraRange(Handle camera, float nearRange, float farRange);
X3DDECL void X3DCALL xCameraViewport(Handle camera, int x, int y, int width, int height);
X3DDECL void X3DCALL xCameraCropViewport(Handle camera, int x, int y, int width, int height);
X3DDECL Handle X3DCALL xCreateCamera(Handle parent = NULL);
X3DDECL void X3DCALL xCameraProject(Handle camera, float x, float y, float z);
X3DDECL void X3DCALL xCameraProject2D(Handle camera, int x, int y, float zDistance);
X3DDECL float X3DCALL xProjectedX();
X3DDECL float X3DCALL xProjectedY();
X3DDECL float X3DCALL xProjectedZ();
X3DDECL Handle X3DCALL xGetViewMatrix(Handle camera);
X3DDECL Handle X3DCALL xGetProjectionMatrix(Handle camera);
X3DDECL void X3DCALL xCameraZoom(Handle camera, float zoom);
X3DDECL Handle X3DCALL xGetViewProjMatrix(Handle camera);

// collisions commands
X3DDECL void X3DCALL xCollisions(int srcType, int destType, int collideMethod, int response);
X3DDECL void X3DCALL xClearCollisions();
X3DDECL void X3DCALL xResetEntity(Handle entity);
X3DDECL void X3DCALL xEntityRadius(Handle entity, float xRadius, float yRadius = 0.0f);
X3DDECL void X3DCALL xEntityBox(Handle entity, float x, float y, float z, float width, float height, float depth);
X3DDECL void X3DCALL xEntityType(Handle entity, int typeID, bool recurse = false);
X3DDECL Handle X3DCALL xEntityCollided(Handle entity, int typeID);
X3DDECL int X3DCALL xCountCollisions(Handle entity);
X3DDECL float X3DCALL xCollisionX(Handle entity, int index);
X3DDECL float X3DCALL xCollisionY(Handle entity, int index);
X3DDECL float X3DCALL xCollisionZ(Handle entity, int index);
X3DDECL float X3DCALL xCollisionNX(Handle entity, int index);
X3DDECL float X3DCALL xCollisionNY(Handle entity, int index);
X3DDECL float X3DCALL xCollisionNZ(Handle entity, int index);
X3DDECL float X3DCALL xCollisionTime(Handle entity, int index);
X3DDECL Handle X3DCALL xCollisionEntity(Handle entity, int index);
X3DDECL Handle X3DCALL xCollisionSurface(Handle entity, int index);
X3DDECL int X3DCALL xCollisionTriangle(Handle entity, int index);
X3DDECL int X3DCALL xGetEntityType(Handle entity);

// constants commands
X3DDECL void X3DCALL xRenderPostEffect(Handle poly);
X3DDECL Handle X3DCALL xCreatePostEffectPoly(Handle camera, int mode);
X3DDECL Handle X3DCALL xGetFunctionAddress(const char * name);

// effects commands
X3DDECL Handle X3DCALL xLoadFXFile(const char * path);
X3DDECL void X3DCALL xFreeEffect(Handle effect);
X3DDECL void X3DCALL xSetEntityEffect(Handle entity, Handle effect, int index = -1);
X3DDECL void X3DCALL xSetSurfaceEffect(Handle surface, Handle effect, int index = -1);
X3DDECL void X3DCALL xSetBonesArrayName(Handle entity, const char * arrayName, int layer = -1);
X3DDECL void X3DCALL xSurfaceBonesArrayName(Handle surface, const char * arrayName, int layer = -1);
X3DDECL void X3DCALL xSetEffectInt(Handle entity, const char * name, int value, int layer = -1);
X3DDECL void X3DCALL xSurfaceEffectInt(Handle surface, const char * name, int value, int layer = -1);
X3DDECL void X3DCALL xSetEffectFloat(Handle entity, const char * name, float value, int layer = -1);
X3DDECL void X3DCALL xSurfaceEffectFloat(Handle surface, const char * name, float value, int layer = -1);
X3DDECL void X3DCALL xSetEffectBool(Handle entity, const char * name, bool value, int layer = -1);
X3DDECL void X3DCALL xSurfaceEffectBool(Handle surface, const char * name, bool value, int layer = -1);
X3DDECL void X3DCALL xSetEffectVector(Handle entity, const char * name, float x, float y, float z, float w = 0.0f, int layer = -1);
X3DDECL void X3DCALL xSurfaceEffectVector(Handle surface, const char * name, float x, float y, float z, float w = 0.0f, int layer = -1);
X3DDECL void X3DCALL xSetEffectVectorArray(Handle entity, const char * name, Handle value, int count, int layer = -1);
X3DDECL void X3DCALL xSurfaceEffectVectorArray(Handle surface, const char * name, Handle value, int count, int layer = -1);
X3DDECL void X3DCALL xSurfaceEffectMatrixArray(Handle surface, const char * name, Handle value, int count, int layer = -1);
X3DDECL void X3DCALL xSurfaceEffectFloatArray(Handle surface, const char * name, Handle value, int count, int layer = -1);
X3DDECL void X3DCALL xSurfaceEffectIntArray(Handle surface, const char * name, Handle value, int count, int layer = -1);
X3DDECL void X3DCALL xSetEffectMatrixArray(Handle entity, const char * name, Handle value, int count, int layer = -1);
X3DDECL void X3DCALL xSetEffectFloatArray(Handle entity, const char * name, Handle value, int count, int layer = -1);
X3DDECL void X3DCALL xSetEffectIntArray(Handle entity, const char * name, Handle value, int count, int layer = -1);
X3DDECL Handle X3DCALL xCreateBufferVectors(int count);
X3DDECL void X3DCALL xBufferVectorsSetElement(Handle buffer, int number, float x, float y, float z, float w);
X3DDECL Handle X3DCALL xCreateBufferMatrix(int count);
X3DDECL void X3DCALL xBufferMatrixSetElement(Handle buffer, int number, Handle matrix);
X3DDECL Handle X3DCALL xBufferMatrixGetElement(Handle buffer, int number);
X3DDECL Handle X3DCALL xCreateBufferFloats(int count);
X3DDECL void X3DCALL xBufferFloatsSetElement(Handle buffer, int number, float value);
X3DDECL float X3DCALL xBufferFloatsGetElement(Handle buffer, int number);
X3DDECL void X3DCALL xBufferDelete(Handle buffer);
X3DDECL void X3DCALL xSetEffectMatrixWithElements(Handle entity, const char * name, float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44, int layer = -1);
X3DDECL void X3DCALL xSetEffectMatrix(Handle entity, const char * name, Handle matrix, int layer = -1);
X3DDECL void X3DCALL xSurfaceEffectMatrix(Handle surface, const char * name, Handle matrix, int layer = -1);
X3DDECL void X3DCALL xSurfaceEffectMatrixWithElements(Handle surface, const char * name, float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44, int layer = -1);
X3DDECL void X3DCALL xSetEffectEntityTexture(Handle entity, const char * name, int index = 0, int layer = -1);
X3DDECL void X3DCALL xSetEffectTexture(Handle entity, const char * name, Handle texture, int frame = 0, int layer = -1, int isRecursive = 1);
X3DDECL void X3DCALL xSurfaceEffectTexture(Handle surface, const char * name, Handle texture, int frame = 0, int layer = -1);
X3DDECL void X3DCALL xSurfaceEffectMatrixSemantic(Handle surface, const char * name, int value, int layer = -1);
X3DDECL void X3DCALL xSetEffectMatrixSemantic(Handle entity, const char * name, int value, int layer = -1);
X3DDECL void X3DCALL xDeleteSurfaceConstant(Handle surface, const char * name, int layer = -1);
X3DDECL void X3DCALL xDeleteEffectConstant(Handle entity, const char * name, int layer = -1);
X3DDECL void X3DCALL xClearSurfaceConstants(Handle surface, int layer = -1);
X3DDECL void X3DCALL xClearEffectConstants(Handle entity, int layer = -1);
X3DDECL void X3DCALL xSetEffectTechnique(Handle entity, const char * name, int layer = -1);
X3DDECL void X3DCALL xSurfaceTechnique(Handle surface, const char * name, int layer = -1);
X3DDECL int X3DCALL xValidateEffectTechnique(Handle effect, const char * name);
X3DDECL void X3DCALL xSetEntityShaderLayer(Handle entity, int layer);
X3DDECL int X3DCALL xGetEntityShaderLayer(Handle entity);
X3DDECL void X3DCALL xSetSurfaceShaderLayer(Handle surface, int layer);
X3DDECL int X3DCALL xGetSurfaceShaderLayer(Handle surface);
X3DDECL void X3DCALL xSetFXInt(Handle effect, const char * name, int value);
X3DDECL void X3DCALL xSetFXFloat(Handle effect, const char * name, float value);
X3DDECL void X3DCALL xSetFXBool(Handle effect, const char * name, bool value);
X3DDECL void X3DCALL xSetFXVector(Handle effect, const char * name, float x, float y, float z, float w = 0.0f);
X3DDECL void X3DCALL xSetFXVectorArray(Handle effect, const char * name, Handle value, int count);
X3DDECL void X3DCALL xSetFXMatrixArray(Handle effect, const char * name, Handle value, int count);
X3DDECL void X3DCALL xSetFXFloatArray(Handle effect, const char * name, Handle value, int count);
X3DDECL void X3DCALL xSetFXIntArray(Handle effect, const char * name, Handle value, int count);
X3DDECL void X3DCALL xSetFXEntityMatrix(Handle effect, const char * name, Handle matrix);
X3DDECL void X3DCALL xSetFXTexture(Handle effect, const char * name, Handle texture, int frame = 0);
X3DDECL void X3DCALL xSetFXMatrixSemantic(Handle effect, const char * name, int value);
X3DDECL void X3DCALL xDeleteFXConstant(Handle effect, const char * name);
X3DDECL void X3DCALL xClearFXConstants(Handle effect);
X3DDECL void X3DCALL xSetFXTechnique(Handle effect, const char * name);

// emitters commands
X3DDECL Handle X3DCALL xCreateEmitter(Handle psystem, Handle parent = NULL);
X3DDECL void X3DCALL xEmitterEnable(Handle emitter, bool state);
X3DDECL int X3DCALL xEmitterEnabled(Handle emitter);
X3DDECL Handle X3DCALL xEmitterGetPSystem(Handle emitter);
X3DDECL Handle X3DCALL xEmitterAddParticle(Handle emitter);
X3DDECL void X3DCALL xEmitterFreeParticle(Handle emitter, Handle particle);
X3DDECL int X3DCALL xEmitterValidateParticle(Handle emitter, Handle particle);
X3DDECL int X3DCALL xEmitterCountParticles(Handle emitter);
X3DDECL Handle X3DCALL xEmitterGetParticle(Handle emitter, int index);
X3DDECL int X3DCALL xEmitterAlive(Handle emitter);

// entity_animation commands
X3DDECL int X3DCALL xExtractAnimSeq(Handle entity, int firstFrame, int lastFrame, int sequence = 0);
X3DDECL int X3DCALL xLoadAnimSeq(Handle entity, const char * path);
X3DDECL void X3DCALL xSetAnimSpeed(Handle entity, float speed, const char * rootBone = "");
X3DDECL float X3DCALL xAnimSpeed(Handle entity, const char * rootBone = "");
X3DDECL int X3DCALL xAnimating(Handle entity, const char * rootBone = "");
X3DDECL float X3DCALL xAnimTime(Handle entity, const char * rootBone = "");
X3DDECL void X3DCALL xAnimate(Handle entity, int mode = 1, float speed = 1.0f, int sequence = 0, float translate = 0.0f, const char * rootBone = "");
X3DDECL int X3DCALL xAnimSeq(Handle entity, const char * rootBone = "");
X3DDECL float X3DCALL xAnimLength(Handle entity, const char * rootBone = "");
X3DDECL void X3DCALL xSetAnimTime(Handle entity, float time, int sequence, const char * rootBone = "");
X3DDECL void X3DCALL xSetAnimFrame(Handle entity, float frame, int sequence, const char * rootBone = "");

// entity_control commands
X3DDECL void X3DCALL xEntityAutoFade(Handle entity, float nearRange, float farRange);
X3DDECL void X3DCALL xEntityOrder(Handle entity, int order);
X3DDECL void X3DCALL xFreeEntity(Handle entity);
X3DDECL Handle X3DCALL xCopyEntity(Handle entity, Handle parent = NULL, int cloneBuffers = 0);
X3DDECL void X3DCALL xPaintEntity(Handle entity, Handle brush);
X3DDECL void X3DCALL xEntityShininess(Handle entity, float shininess);
X3DDECL void X3DCALL xEntityPickMode(Handle entity, int mode, bool obscurer = true, bool recursive = true);
X3DDECL void X3DCALL xEntityTexture(Handle entity, Handle texture, int frame = 0, int index = 0, int isRecursive = 1);
X3DDECL void X3DCALL xEntityFX(Handle entity, int fx);
X3DDECL Handle X3DCALL xGetParent(Handle entity);
X3DDECL void X3DCALL xSetFrustumSphere(Handle entity, float x, float y, float z, float radii);
X3DDECL void X3DCALL xCalculateFrustumVolume(Handle entity);
X3DDECL void X3DCALL xEntityParent(Handle entity, Handle parent = NULL, bool isGlobal = true);
X3DDECL void X3DCALL xShowEntity(Handle entity);
X3DDECL void X3DCALL xHideEntity(Handle entity);
X3DDECL void X3DCALL xNameEntity(Handle entity, const char * name);
X3DDECL void X3DCALL xSetEntityQuaternion(Handle entity, Handle quaternion);
X3DDECL void X3DCALL xSetEntityMatrix(Handle entity, Handle matrix);
X3DDECL void X3DCALL xEntityAlpha(Handle entity, float alpha);
X3DDECL void X3DCALL xEntityColor(Handle entity, int red, int green, int blue);
X3DDECL void X3DCALL xEntitySpecularColor(Handle entity, int red, int green, int blue);
X3DDECL void X3DCALL xEntityAmbientColor(Handle entity, int red, int green, int blue);
X3DDECL void X3DCALL xEntityEmissiveColor(Handle entity, int red, int green, int blue);
X3DDECL void X3DCALL xEntityBlend(Handle entity, int mode);
X3DDECL void X3DCALL xEntityAlphaRef(Handle entity, int value);
X3DDECL void X3DCALL xEntityAlphaFunc(Handle entity, int value);
X3DDECL Handle X3DCALL xCreateInstance(Handle entity, Handle parent = NULL);
X3DDECL void X3DCALL xFreezeInstances(Handle entity, bool enable = true);
X3DDECL int X3DCALL xInstancingAvaliable();
X3DDECL Handle X3DCALL xGetEntityWorld(Handle entity);
X3DDECL void X3DCALL xSetEntityWorld(Handle entity, Handle world);

// entity_movement commands
X3DDECL void X3DCALL xScaleEntity(Handle entity, float x, float y, float z, bool isGlobal = false);
X3DDECL void X3DCALL xPositionEntity(Handle entity, float x, float y, float z, bool isGlobal = false);
X3DDECL void X3DCALL xMoveEntity(Handle entity, float x, float y, float z, bool isGlobal = false);
X3DDECL void X3DCALL xTranslateEntity(Handle entity, float x, float y, float z, bool isGlobal = false);
X3DDECL void X3DCALL xRotateEntity(Handle entity, float x, float y, float z, bool isGlobal = false);
X3DDECL void X3DCALL xTurnEntity(Handle entity, float x, float y, float z, bool isGlobal = false);
X3DDECL void X3DCALL xPointEntity(Handle entity1, Handle entity2, float roll = 0.0f);
X3DDECL void X3DCALL xAlignToVector(Handle entity, float x, float y, float z, int axis, float factor = 1.0f);

// entity_state commands
X3DDECL float X3DCALL xEntityDistance(Handle entity1, Handle entity2);
X3DDECL float X3DCALL xGetMatElement(Handle entity, int row, int col);
X3DDECL const char * X3DCALL xEntityClass(Handle entity);
X3DDECL Handle X3DCALL xGetEntityBrush(Handle entity);
X3DDECL float X3DCALL xEntityX(Handle entity, bool isGlobal = false);
X3DDECL float X3DCALL xEntityY(Handle entity, bool isGlobal = false);
X3DDECL float X3DCALL xEntityZ(Handle entity, bool isGlobal = false);
X3DDECL int X3DCALL xEntityVisible(Handle entity, Handle destination);
X3DDECL float X3DCALL xEntityScaleX(Handle entity);
X3DDECL float X3DCALL xEntityScaleY(Handle entity);
X3DDECL float X3DCALL xEntityScaleZ(Handle entity);
X3DDECL float X3DCALL xEntityRoll(Handle entity, bool isGlobal = false);
X3DDECL float X3DCALL xEntityYaw(Handle entity, bool isGlobal = false);
X3DDECL float X3DCALL xEntityPitch(Handle entity, bool isGlobal = false);
X3DDECL const char * X3DCALL xEntityName(Handle entity);
X3DDECL int X3DCALL xCountChildren(Handle entity);
X3DDECL Handle X3DCALL xGetChild(Handle entity, int index);
X3DDECL int X3DCALL xEntityInView(Handle entity, Handle camera);
X3DDECL Handle X3DCALL xFindChild(Handle entity, const char * name);
X3DDECL Handle X3DCALL xGetEntityMatrix(Handle entity);
X3DDECL float X3DCALL xGetEntityAlpha(Handle entity);
X3DDECL int X3DCALL xGetAlphaRef(Handle entity);
X3DDECL int X3DCALL xGetAlphaFunc(Handle entity);
X3DDECL int X3DCALL xEntityRed(Handle entity);
X3DDECL int X3DCALL xEntityGreen(Handle entity);
X3DDECL int X3DCALL xEntityBlue(Handle entity);
X3DDECL float X3DCALL xGetEntityShininess(Handle entity);
X3DDECL int X3DCALL xGetEntityBlend(Handle entity);
X3DDECL int X3DCALL xGetEntityFX(Handle entity);
X3DDECL int X3DCALL xEntityHidden(Handle entity);
X3DDECL int X3DCALL xEntitiesBBIntersect(Handle entity1, Handle entity2);

// filesystems commands
X3DDECL Handle X3DCALL xMountPackFile(const char * path, const char * mountpoint = "", const char * password = "");
X3DDECL void X3DCALL xUnmountPackFile(Handle packfile);
X3DDECL Handle X3DCALL xOpenFile(const char * path);
X3DDECL Handle X3DCALL xReadFile(const char * path);
X3DDECL Handle X3DCALL xWriteFile(const char * path);
X3DDECL void X3DCALL xCloseFile(Handle file);
X3DDECL int X3DCALL xFilePos(Handle file);
X3DDECL void X3DCALL xSeekFile(Handle file, int offset);
X3DDECL int X3DCALL xFileType(const char * path);
X3DDECL int X3DCALL xFileSize(const char * path);
X3DDECL int X3DCALL xFileCreationTime(const char * path);
X3DDECL const char * X3DCALL xFileCreationTimeStr(const char * path);
X3DDECL int X3DCALL xFileModificationTime(const char * path);
X3DDECL const char * X3DCALL xFileModificationTimeStr(const char * path);
X3DDECL int X3DCALL xReadDir(const char * path);
X3DDECL void X3DCALL xCloseDir(int handle);
X3DDECL const char * X3DCALL xNextFile(int handle);
X3DDECL const char * X3DCALL xCurrentDir();
X3DDECL void X3DCALL xChangeDir(const char * path);
X3DDECL int X3DCALL xCreateDir(const char * path);
X3DDECL int X3DCALL xDeleteDir(const char * path);
X3DDECL int X3DCALL xCopyFile(const char * pathSrc, const char * pathDest);
X3DDECL int X3DCALL xDeleteFile(const char * path);
X3DDECL int X3DCALL xEof(Handle file);
X3DDECL int X3DCALL xReadByte(Handle file);
X3DDECL int X3DCALL xReadShort(Handle file);
X3DDECL int X3DCALL xReadInt(Handle file);
X3DDECL float X3DCALL xReadFloat(Handle file);
X3DDECL const char * X3DCALL xReadString(Handle file);
X3DDECL const char * X3DCALL xReadLine(Handle file, int ls_flag = 0);
X3DDECL void X3DCALL xWriteByte(Handle file, int value);
X3DDECL void X3DCALL xWriteShort(Handle file, int value);
X3DDECL void X3DCALL xWriteInt(Handle file, int value);
X3DDECL void X3DCALL xWriteFloat(Handle file, float value);
X3DDECL void X3DCALL xWriteString(Handle file, const char * value);
X3DDECL void X3DCALL xWriteLine(Handle file, const char * value, int ls_flag = 0);

// fonts commands
X3DDECL Handle X3DCALL xLoadFont(const char * name, int height, bool bold = false, bool italic = false, bool underline = false, const char * fontface = "");
X3DDECL void X3DCALL xText(float x, float y, const char * textString, bool centerx = false, bool centery = false);
X3DDECL void X3DCALL xSetFont(Handle font);
X3DDECL void X3DCALL xFreeFont(Handle font);
X3DDECL int X3DCALL xFontWidth();
X3DDECL int X3DCALL xFontHeight();
X3DDECL int X3DCALL xStringWidth(const char * textString);
X3DDECL int X3DCALL xStringHeight(const char * textString);

// graphics commands
X3DDECL int X3DCALL xWinMessage(const char * message);
X3DDECL int X3DCALL xGetMaxPixelShaderVersion();
X3DDECL void X3DCALL xLine(int x1, int y1, int x2, int y2);
X3DDECL void X3DCALL xRect(int x, int y, int width, int height, bool solid = false);
X3DDECL int X3DCALL xRectsOverlap(int x1, int y1, int width1, int height1, int x2, int y2, int width2, int height2);
X3DDECL void X3DCALL xViewport(int x, int y, int width, int height);
X3DDECL void X3DCALL xOval(int x, int y, int width, int height, bool solid = false);
X3DDECL void X3DCALL xOrigin(int x, int y);
X3DDECL int X3DCALL xGetMaxVertexShaderVersion();
X3DDECL int X3DCALL xGetMaxAntiAlias();
X3DDECL int X3DCALL xGetMaxTextureFiltering();
X3DDECL void X3DCALL xSetAntiAliasType(int typeID);
X3DDECL void X3DCALL xAppTitle(const char * title);
X3DDECL void X3DCALL xSetWND(Handle window);
X3DDECL void X3DCALL xSetRenderWindow(Handle window);
X3DDECL void X3DCALL xSetTopWindow(Handle window);
X3DDECL void X3DCALL xDestroyRenderWindow();
X3DDECL void X3DCALL xFlip();
X3DDECL Handle X3DCALL xBackBuffer();
X3DDECL void X3DCALL xLockBuffer(int buffer = NULL);
X3DDECL void X3DCALL xUnlockBuffer(int buffer = NULL);
X3DDECL void X3DCALL xWritePixelFast(int x, int y, DWORD argb, int buffer = -1);
X3DDECL DWORD X3DCALL xReadPixelFast(int x, int y, int buffer = -1);
X3DDECL Handle X3DCALL xGetPixels(int buffer = -1);
X3DDECL void X3DCALL xSaveBuffer(int buffer, const char * path);
X3DDECL int X3DCALL xGetCurrentBuffer();
X3DDECL int X3DCALL xBufferWidth(int buffer = NULL);
X3DDECL int X3DCALL xBufferHeight(int buffer = NULL);
X3DDECL Handle X3DCALL xCatchTimestamp();
X3DDECL float X3DCALL xGetElapsedTime(Handle timeStamp);
X3DDECL void X3DCALL xSetBuffer(int buffer = NULL);
X3DDECL void X3DCALL xSetMRT(Handle buffer, int frame, int index);
X3DDECL void X3DCALL xUnSetMRT();
X3DDECL int X3DCALL xGetNumberRT();
X3DDECL Handle X3DCALL xTextureBuffer(Handle texture, int frame = 0);
X3DDECL void X3DCALL xLoadBuffer(int buffer, const char * path);
X3DDECL void X3DCALL xWritePixel(int x, int y, DWORD argb, int buffer = NULL);
X3DDECL void X3DCALL xCopyPixel(int sx, int sy, int sourceBuffer, int dx, int dy, int destinationBuffer);
X3DDECL void X3DCALL xCopyPixelFast(int sx, int sy, int sourceBuffer, int dx, int dy, int destinationBuffer);
X3DDECL void X3DCALL xCopyRect(int sx, int sy, int sw, int sh, int dx, int dy, int sourceBuffer, int destinationBuffer);
X3DDECL int X3DCALL xGraphicsBuffer();
X3DDECL DWORD X3DCALL xGetColor(int x, int y);
X3DDECL DWORD X3DCALL xReadPixel(int x, int y, int buffer = NULL);
X3DDECL int X3DCALL xGraphicsWidth(bool isVirtual = true);
X3DDECL int X3DCALL xGraphicsHeight(bool isVirtual = true);
X3DDECL int X3DCALL xGraphicsDepth();
X3DDECL int X3DCALL xColorAlpha();
X3DDECL int X3DCALL xColorRed();
X3DDECL int X3DCALL xColorGreen();
X3DDECL int X3DCALL xColorBlue();
X3DDECL void X3DCALL xClsColor(int red, int green, int blue, int alpha = 255);
X3DDECL void X3DCALL xClearWorld(bool entities = true, bool brushes = true, bool textures = true);
X3DDECL void X3DCALL xColor(int red, int green, int blue, int alpha = 255);
X3DDECL void X3DCALL xCls();
X3DDECL void X3DCALL xUpdateWorld(float speed = 1.0f);
X3DDECL void X3DCALL xRenderEntity(Handle camera, Handle entity, float tween = 1.0f);
X3DDECL void X3DCALL xRenderWorld(float tween = 1.0f, bool renderShadows = false);
X3DDECL void X3DCALL xSetAutoTB(bool flag);
X3DDECL int X3DCALL xMaxClipPlanes();
X3DDECL void X3DCALL xWireframe(int state);
X3DDECL void X3DCALL xDither(int state);
X3DDECL void X3DCALL xSetSkinningMethod(int skinMethod);
X3DDECL DWORD X3DCALL xTrisRendered();
X3DDECL int X3DCALL xDIPCounter();
X3DDECL int X3DCALL xSurfRendered();
X3DDECL int X3DCALL xEntityRendered();
X3DDECL void X3DCALL xAmbientLight(int red, int green, int blue, Handle world = NULL);
X3DDECL int X3DCALL xGetFPS();
X3DDECL void X3DCALL xAntiAlias(int state);
X3DDECL void X3DCALL xSetTextureFiltering(int filter);
X3DDECL void X3DCALL xStretchRect(Handle texture1, int x1, int y1, int width1, int height1, Handle texture2, int x2, int y2, int width2, int height2, int filter);
X3DDECL void X3DCALL xStretchBackBuffer(Handle texture, int x, int y, int width, int height, int filter);
X3DDECL Handle X3DCALL xGetDevice();
X3DDECL void X3DCALL xReleaseGraphics();
X3DDECL void X3DCALL xShowPointer();
X3DDECL void X3DCALL xHidePointer();
X3DDECL void X3DCALL xCreateDSS(int width, int height);
X3DDECL void X3DCALL xDeleteDSS();
X3DDECL void X3DCALL xGridColor(int centerRed, int centerGreen, int centerBlue, int gridRed, int gridGreen, int gridBlue);
X3DDECL void X3DCALL xDrawGrid(float x, float z, int gridSize, int range);
X3DDECL void X3DCALL xDrawBBox(bool draw, bool zOn, int red, int green, int blue, int alpha);
X3DDECL void X3DCALL xGraphics3D(int width = 1024, int height = 768, int depth = 0, int mode = 0, int vsync = 1);
X3DDECL void X3DCALL xGraphicsAspectRatio(float aspectRatio);
X3DDECL void X3DCALL xGraphicsBorderColor(int red, int green, int blue);
X3DDECL Handle X3DCALL xGetRenderWindow();
X3DDECL void X3DCALL xKey(const char * key);
X3DDECL void X3DCALL xSetEngineSetting(const char * parameter, const char * value);
X3DDECL const char * X3DCALL xGetEngineSetting(const char * parameter);
X3DDECL int X3DCALL xHWInstancingAvailable();
X3DDECL int X3DCALL xShaderInstancingAvailable();
X3DDECL void X3DCALL xSetShaderLayer(int layer);
X3DDECL int X3DCALL xGetShaderLayer();
X3DDECL void X3DCALL xDrawMovementGizmo(float x, float y, float z, int selectMask = 0);
X3DDECL void X3DCALL xDrawScaleGizmo(float x, float y, float z, int selectMask = 0, float sx = 1.0f, float sy = 1.0f, float sz = 1.0f);
X3DDECL void X3DCALL xDrawRotationGizmo(float x, float y, float z, int selectMask = 0, float pitch = 0.0f, float yaw = 0.0f, float roll = 0.0f);
X3DDECL int X3DCALL xCheckMovementGizmo(float x, float y, float z, Handle camera, int mx, int my);
X3DDECL int X3DCALL xCheckScaleGizmo(float x, float y, float z, Handle camera, int mx, int my);
X3DDECL int X3DCALL xCheckRotationGizmo(float x, float y, float z, Handle camera, int mx, int my);
X3DDECL void X3DCALL xCaptureWorld();
X3DDECL int X3DCALL xCountGfxModes();
X3DDECL int X3DCALL xGfxModeWidth(int mode);
X3DDECL int X3DCALL xGfxModeHeight(int mode);
X3DDECL int X3DCALL xGfxModeDepth(int mode);
X3DDECL int X3DCALL xGfxModeExists(int width, int height, int depth);
X3DDECL void X3DCALL xAppWindowFrame(int state);
X3DDECL int X3DCALL xMillisecs();
X3DDECL int X3DCALL xDeltaTime(bool fromInit = false);
X3DDECL float X3DCALL xDeltaValue(float value, int time = 0);
X3DDECL void X3DCALL xAddDeviceLostCallback(int func);
X3DDECL void X3DCALL xDeleteDeviceLostCallback(int func);
X3DDECL void X3DCALL xDeinit();

// images commands
X3DDECL void X3DCALL xImageColor(Handle image, int red, int green, int blue);
X3DDECL void X3DCALL xImageAlpha(Handle image, float alpha);
X3DDECL Handle X3DCALL xImageBuffer(Handle image, int frame = 0);
X3DDECL Handle X3DCALL xCreateImage(int width, int height, int frame = 1);
X3DDECL void X3DCALL xGrabImage(Handle image, int x, int y, int frame = 0);
X3DDECL void X3DCALL xFreeImage(Handle image);
X3DDECL Handle X3DCALL xLoadImage(const char * path);
X3DDECL Handle X3DCALL xLoadAnimImage(const char * path, int width, int height, int startFrame, int frames);
X3DDECL void X3DCALL xSaveImage(Handle image, const char * path, int frame = 0);
X3DDECL void X3DCALL xDrawImage(Handle image, float x, float y, int frame = 0);
X3DDECL void X3DCALL xDrawImageRect(Handle image, float x, float y, float rectx, float recty, float rectWidth, float rectHeight, int frame = 0);
X3DDECL void X3DCALL xScaleImage(Handle image, float x, float y);
X3DDECL void X3DCALL xResizeImage(Handle image, float width, float height);
X3DDECL void X3DCALL xRotateImage(Handle image, float angle);
X3DDECL float X3DCALL xImageAngle(Handle image);
X3DDECL int X3DCALL xImageWidth(Handle image);
X3DDECL int X3DCALL xImageHeight(Handle image);
X3DDECL int X3DCALL xImagesCollide(Handle image1, int x1, int y1, int frame1, Handle image2, int x2, int y2, int frame2);
X3DDECL int X3DCALL xImageRectCollide(Handle image, int x, int y, int frame, int rectx, int recty, int rectWidth, int rectHeight);
X3DDECL int X3DCALL xImageRectOverlap(Handle image, float x, float y, float rectx, float recty, float rectWidth, float rectHeight);
X3DDECL int X3DCALL xImageXHandle(Handle image);
X3DDECL int X3DCALL xImageYHandle(Handle image);
X3DDECL void X3DCALL xHandleImage(Handle image, float x, float y);
X3DDECL void X3DCALL xMidHandle(Handle image);
X3DDECL void X3DCALL xAutoMidHandle(int state);
X3DDECL void X3DCALL xTileImage(Handle image, float x, float y, int frame = 0);
X3DDECL int X3DCALL xImagesOverlap(Handle image1, float x1, float y1, Handle image2, float x2, float y2);
X3DDECL void X3DCALL xMaskImage(Handle image, int red, int green, int blue);
X3DDECL Handle X3DCALL xCopyImage(Handle image);
X3DDECL void X3DCALL xDrawBlock(Handle image, float x, float y, int frame = 0);
X3DDECL void X3DCALL xDrawBlockRect(Handle image, float x, float y, float rectx, float recty, float rectWidth, float rectHeight, int frame = 0);
X3DDECL int X3DCALL xImageActualWidth(Handle image);
X3DDECL int X3DCALL xImageActualHeight(Handle image);

// inputs commands
X3DDECL void X3DCALL xFlushKeys();
X3DDECL void X3DCALL xFlushMouse();
X3DDECL int X3DCALL xKeyHit(int key);
X3DDECL int X3DCALL xKeyUp(int key);
X3DDECL void X3DCALL xWaitKey();
X3DDECL int X3DCALL xMouseHit(int key);
X3DDECL int X3DCALL xKeyDown(int key);
X3DDECL int X3DCALL xGetKey();
X3DDECL int X3DCALL xMouseDown(int key);
X3DDECL int X3DCALL xMouseUp(int key);
X3DDECL int X3DCALL xGetMouse();
X3DDECL int X3DCALL xMouseX();
X3DDECL int X3DCALL xMouseY();
X3DDECL int X3DCALL xMouseZ();
X3DDECL int X3DCALL xMouseXSpeed();
X3DDECL int X3DCALL xMouseYSpeed();
X3DDECL int X3DCALL xMouseZSpeed();
X3DDECL int X3DCALL xMouseSpeed();
X3DDECL void X3DCALL xMoveMouse(int x, int y);

// joysticks commands
X3DDECL int X3DCALL xJoyType(int portID = 0);
X3DDECL int X3DCALL xJoyDown(int key, int portID = 0);
X3DDECL int X3DCALL xJoyHit(int key, int portID = 0);
X3DDECL int X3DCALL xGetJoy(int portID = 0);
X3DDECL void X3DCALL xFlushJoy();
X3DDECL int X3DCALL xWaitJoy(int portID = 0);
X3DDECL float X3DCALL xJoyX(int portID = 0);
X3DDECL float X3DCALL xJoyY(int portID = 0);
X3DDECL float X3DCALL xJoyZ(int portID = 0);
X3DDECL float X3DCALL xJoyU(int portID = 0);
X3DDECL float X3DCALL xJoyV(int portID = 0);
X3DDECL float X3DCALL xJoyPitch(int portID = 0);
X3DDECL float X3DCALL xJoyYaw(int portID = 0);
X3DDECL float X3DCALL xJoyRoll(int portID = 0);
X3DDECL float X3DCALL xJoyHat(int portID = 0);
X3DDECL int X3DCALL xJoyXDir(int portID = 0);
X3DDECL int X3DCALL xJoyYDir(int portID = 0);
X3DDECL int X3DCALL xJoyZDir(int portID = 0);
X3DDECL int X3DCALL xJoyUDir(int portID = 0);
X3DDECL int X3DCALL xJoyVDir(int portID = 0);
X3DDECL int X3DCALL xCountJoys();

// lights commands
X3DDECL Handle X3DCALL xCreateLight(int typeID = 1);
X3DDECL void X3DCALL xLightShadowEpsilons(Handle light, float epsilon1, float epsilon2);
X3DDECL void X3DCALL xLightEnableShadows(Handle light, int state);
X3DDECL int X3DCALL xLightShadowsEnabled(Handle light);
X3DDECL void X3DCALL xLightRange(Handle light, float range);
X3DDECL void X3DCALL xLightColor(Handle light, int red, int green, int blue);
X3DDECL void X3DCALL xLightConeAngles(Handle light, float inner, float outer);

// logging commands
X3DDECL int X3DCALL xCreateLog(int target = 1, int level = 0, const char * filename = "xors_log.html", const char * cssfilename = "");
X3DDECL int X3DCALL xCloseLog();
X3DDECL const char * X3DCALL xGetLogString();
X3DDECL void X3DCALL xClearLogString();
X3DDECL void X3DCALL xSetLogLevel(int level = 2);
X3DDECL void X3DCALL xSetLogTarget(int target = 1);
X3DDECL int X3DCALL xGetLogLevel();
X3DDECL int X3DCALL xGetLogTarget();
X3DDECL void X3DCALL xLogInfo(const char * message, const char * func = "", const char * file = "", int line = -1);
X3DDECL void X3DCALL xLogMessage(const char * message, const char * func = "", const char * file = "", int line = -1);
X3DDECL void X3DCALL xLogWarning(const char * message, const char * func = "", const char * file = "", int line = -1);
X3DDECL void X3DCALL xLogError(const char * message, const char * func = "", const char * file = "", int line = -1);
X3DDECL void X3DCALL xLogFatal(const char * message, const char * func = "", const char * file = "", int line = -1);

// meshes commands
X3DDECL Handle X3DCALL xCreateMesh(Handle parent = NULL);
X3DDECL Handle X3DCALL xLoadMesh(const char * path, Handle parent = NULL);
X3DDECL Handle X3DCALL xLoadMeshWithChild(const char * path, Handle parent = NULL);
X3DDECL Handle X3DCALL xLoadAnimMesh(const char * path, Handle parent = NULL);
X3DDECL Handle X3DCALL xCreateCube(Handle parent = NULL);
X3DDECL Handle X3DCALL xCreateSphere(int segments = 16, Handle parent = NULL);
X3DDECL Handle X3DCALL xCreateCylinder(int segments = 16, bool solid = true, Handle parent = NULL);
X3DDECL Handle X3DCALL xCreateTorus(int segments = 16, float R = 1.0f, float r_tube = 0.025f, Handle parent = NULL);
X3DDECL Handle X3DCALL xCreateCone(int segments = 16, bool solid = true, Handle parent = NULL);
X3DDECL Handle X3DCALL xCopyMesh(Handle entity, Handle parent = NULL);
X3DDECL void X3DCALL xAddMesh(Handle source, Handle destination);
X3DDECL void X3DCALL xFlipMesh(Handle entity);
X3DDECL void X3DCALL xPaintMesh(Handle entity, Handle brush);
X3DDECL void X3DCALL xFitMesh(Handle entity, float x, float y, float z, float width, float height, float depth, bool uniform = false);
X3DDECL float X3DCALL xMeshWidth(Handle entity, bool recursive = false);
X3DDECL float X3DCALL xMeshHeight(Handle entity, bool recursive = false);
X3DDECL float X3DCALL xMeshDepth(Handle entity, bool recursive = false);
X3DDECL void X3DCALL xScaleMesh(Handle entity, float x, float y, float z);
X3DDECL void X3DCALL xRotateMesh(Handle entity, float x, float y, float z);
X3DDECL void X3DCALL xPositionMesh(Handle entity, float x, float y, float z);
X3DDECL void X3DCALL xUpdateNormals(Handle entity);
X3DDECL void X3DCALL xUpdateN(Handle entity);
X3DDECL void X3DCALL xUpdateTB(Handle entity);
X3DDECL int X3DCALL xMeshesBBIntersect(Handle entity1, Handle entity2);
X3DDECL int X3DCALL xMeshesIntersect(Handle entity1, Handle entity2);
X3DDECL Handle X3DCALL xGetMeshVB(Handle entity);
X3DDECL Handle X3DCALL xGetMeshIB(Handle entity);
X3DDECL int X3DCALL xGetMeshVBSize(Handle entity);
X3DDECL int X3DCALL xGetMeshIBSize(Handle entity);
X3DDECL void X3DCALL xDeleteMeshVB(Handle entity);
X3DDECL void X3DCALL xDeleteMeshIB(Handle entity);
X3DDECL int X3DCALL xCountSurfaces(Handle entity);
X3DDECL Handle X3DCALL xGetSurface(Handle entity, int index);
X3DDECL Handle X3DCALL xCreatePivot(Handle parent = NULL);
X3DDECL Handle X3DCALL xFindSurface(Handle entity, Handle brush);
X3DDECL Handle X3DCALL xCreatePoly(int sides = 0, Handle parent = NULL);
X3DDECL void X3DCALL xMeshSingleSurface(Handle entity);
X3DDECL int X3DCALL xSaveMesh(Handle entity, const char * path);
X3DDECL void X3DCALL xLightMesh(Handle entity, int red, int green, int blue, float range = 0.0f, float lightX = 0.0f, float lightY = 0.0f, float lightZ = 0.0f);
X3DDECL void X3DCALL xMeshPrimitiveType(Handle entity, int ptype);

// particles commands
X3DDECL void X3DCALL xParticlePosition(Handle particle, float x, float y, float z);
X3DDECL float X3DCALL xParticleX(Handle particle);
X3DDECL float X3DCALL xParticleY(Handle particle);
X3DDECL float X3DCALL xParticleZ(Handle particle);
X3DDECL void X3DCALL xParticleVeclocity(Handle particle, float x, float y, float z);
X3DDECL float X3DCALL xParticleVX(Handle particle);
X3DDECL float X3DCALL xParticleVY(Handle particle);
X3DDECL float X3DCALL xParticleVZ(Handle particle);
X3DDECL void X3DCALL xParticleRotation(Handle particle, float x, float y, float z);
X3DDECL float X3DCALL xParticlePitch(Handle particle);
X3DDECL float X3DCALL xParticleYaw(Handle particle);
X3DDECL float X3DCALL xParticleRoll(Handle particle);
X3DDECL void X3DCALL xParticleTorque(Handle particle, float x, float y, float z);
X3DDECL float X3DCALL xParticleTPitch(Handle particle);
X3DDECL float X3DCALL xParticleTYaw(Handle particle);
X3DDECL float X3DCALL xParticleTRoll(Handle particle);
X3DDECL void X3DCALL xParticleSetAlpha(Handle particle, float alpha);
X3DDECL float X3DCALL xParticleGetAlpha(Handle particle);
X3DDECL void X3DCALL xParticleColor(Handle particle, float x, float y, float z);
X3DDECL float X3DCALL xParticleRed(Handle particle);
X3DDECL float X3DCALL xParticleGreen(Handle particle);
X3DDECL float X3DCALL xParticleBlue(Handle particle);
X3DDECL void X3DCALL xParticleScale(Handle particle, float x, float y);
X3DDECL float X3DCALL xParticleSX(Handle particle);
X3DDECL float X3DCALL xParticleSY(Handle particle);
X3DDECL void X3DCALL xParticleScaleSpeed(Handle particle, float x, float y);
X3DDECL float X3DCALL xParticleScaleSpeedX(Handle particle);
X3DDECL float X3DCALL xParticleScaleSpeedY(Handle particle);

// physics commands
X3DDECL void X3DCALL xEntityAddDummyShape(Handle entity);
X3DDECL void X3DCALL xEntityAddBoxShape(Handle entity, float mass, float width = 0.0f, float height = 0.0f, float depth = 0.0f);
X3DDECL void X3DCALL xEntityAddSphereShape(Handle entity, float mass, float radius = 0.0f);
X3DDECL void X3DCALL xEntityAddCapsuleShape(Handle entity, float mass, float radius = 0.0f, float height = 0.0f);
X3DDECL void X3DCALL xEntityAddConeShape(Handle entity, float mass, float radius = 0.0f, float height = 0.0f);
X3DDECL void X3DCALL xEntityAddCylinderShape(Handle entity, float mass, float width = 0.0f, float height = 0.0f, float depth = 0.0f);
X3DDECL void X3DCALL xEntityAddTriMeshShape(Handle entity);
X3DDECL void X3DCALL xEntityAddTriMeshShapeProxy(Handle entity, Handle proxy);
X3DDECL void X3DCALL xEntityAddConvexShape(Handle entity, float mass);
X3DDECL void X3DCALL xEntityAddConvexShapeProxy(Handle entity, Handle proxy, float mass);
X3DDECL void X3DCALL xEntityAddConcaveShape(Handle entity, float mass);
X3DDECL void X3DCALL xEntityAddConcaveShapeProxy(Handle entity, Handle proxy, float mass);
X3DDECL void X3DCALL xEntityAddTerrainShape(Handle entity);
X3DDECL void X3DCALL xEntityAttachBody(Handle entity, Handle body);
X3DDECL Handle X3DCALL xEntityDetachBody(Handle entity);
X3DDECL void X3DCALL xFreeEntityBody(Handle entity);
X3DDECL void X3DCALL xEntityAddCompoundShape(Handle entity, float mass);
X3DDECL int X3DCALL xEntityCompoundAddBox(Handle entity, float width, float height, float depth);
X3DDECL int X3DCALL xEntityCompoundAddSphere(Handle entity, float radius);
X3DDECL int X3DCALL xEntityCompoundAddCapsule(Handle entity, float radius, float height);
X3DDECL int X3DCALL xEntityCompoundAddCone(Handle entity, float radius, float height);
X3DDECL int X3DCALL xEntityCompoundAddCylinder(Handle entity, float radius, float height);
X3DDECL int X3DCALL xEntityCompoundCountChildren(Handle entity);
X3DDECL void X3DCALL xEntityCompoundRemoveChild(Handle entity, int index);
X3DDECL void X3DCALL xEntityCompoundChildSetPosition(Handle entity, int index, float x, float y, float z);
X3DDECL float X3DCALL xEntityCompoundChildGetX(Handle entity, int index);
X3DDECL float X3DCALL xEntityCompoundChildGetY(Handle entity, int index);
X3DDECL float X3DCALL xEntityCompoundChildGetZ(Handle entity, int index);
X3DDECL void X3DCALL xEntityCompoundChildSetRotation(Handle entity, int index, float pitch, float yaw, float roll);
X3DDECL float X3DCALL xEntityCompoundChildGetPitch(Handle entity, int index);
X3DDECL float X3DCALL xEntityCompoundChildGetYaw(Handle entity, int index);
X3DDECL float X3DCALL xEntityCompoundChildGetRoll(Handle entity, int index);
X3DDECL Handle X3DCALL xCreateHingeJoint(Handle firstBody, Handle secondBody, float pivotX, float pivotY, float pivotZ, float axisX, float axisY, float axisZ, bool isGlobal = false);
X3DDECL Handle X3DCALL xCreateBallJoint(Handle firstBody, Handle secondBody, float pivotX, float pivotY, float pivotZ, bool isGlobal = false);
X3DDECL Handle X3DCALL xCreateD6Joint(Handle firstBody, Handle secondBody, float pivot1X, float pivot1Y, float pivot1Z, float pivot2X, float pivot2Y, float pivot2Z, bool isGlobal1 = false, bool isGlobal2 = false);
X3DDECL Handle X3DCALL xCreateD6SpringJoint(Handle firstBody, Handle secondBody, float pivot1X, float pivot1Y, float pivot1Z, float pivot2X, float pivot2Y, float pivot2Z, bool isGlobal1 = false, bool isGlobal2 = false);
X3DDECL float X3DCALL xJointHingeGetAngle(Handle joint);
X3DDECL float X3DCALL xJointD6GetPitchAngle(Handle joint);
X3DDECL float X3DCALL xJointD6GetYawAngle(Handle joint);
X3DDECL float X3DCALL xJointD6GetRollAngle(Handle joint);
X3DDECL float X3DCALL xJointD6GetAngle(Handle joint, int axis = 0);
X3DDECL void X3DCALL xJointDisableCollisions(Handle joint, int state);
X3DDECL void X3DCALL xJointEnable(Handle joint, int state);
X3DDECL int X3DCALL xJointIsEnabled(Handle joint);
X3DDECL float X3DCALL xJointGetImpulse(Handle joint);
X3DDECL void X3DCALL xFreeJoint(Handle joint);
X3DDECL void X3DCALL xJointBallSetPivot(Handle joint, float x, float y, float z, bool isGlobal = false);
X3DDECL float X3DCALL xJointBallGetPivotX(Handle joint, bool isGlobal = false);
X3DDECL float X3DCALL xJointBallGetPivotY(Handle joint, bool isGlobal = false);
X3DDECL float X3DCALL xJointBallGetPivotZ(Handle joint, bool isGlobal = false);
X3DDECL void X3DCALL xJointD6SetLimits(Handle joint, int axis, float lower, float upper);
X3DDECL void X3DCALL xJointD6SetLowerLinearLimits(Handle joint, float lowerX, float lowerY, float lowerZ);
X3DDECL void X3DCALL xJointD6SetUpperLinearLimits(Handle joint, float upperX, float upperY, float upperZ);
X3DDECL void X3DCALL xJointD6SetLowerAngularLimits(Handle joint, float lowerX, float lowerY, float lowerZ);
X3DDECL void X3DCALL xJointD6SetUpperAngularLimits(Handle joint, float upperX, float upperY, float upperZ);
X3DDECL void X3DCALL xJointD6SetLinearLimits(Handle joint, float lowerX, float lowerY, float lowerZ, float upperX, float upperY, float upperZ);
X3DDECL void X3DCALL xJointD6SetAngularLimits(Handle joint, float lowerX, float lowerY, float lowerZ, float upperX, float upperY, float upperZ);
X3DDECL float X3DCALL xJointD6GetLinearLowerX(Handle joint);
X3DDECL float X3DCALL xJointD6GetLinearLowerY(Handle joint);
X3DDECL float X3DCALL xJointD6GetLinearLowerZ(Handle joint);
X3DDECL float X3DCALL xJointD6GetLinearUpperX(Handle joint);
X3DDECL float X3DCALL xJointD6GetLinearUpperY(Handle joint);
X3DDECL float X3DCALL xJointD6GetLinearUpperZ(Handle joint);
X3DDECL float X3DCALL xJointD6GetAngularLowerX(Handle joint);
X3DDECL float X3DCALL xJointD6GetAngularLowerY(Handle joint);
X3DDECL float X3DCALL xJointD6GetAngularLowerZ(Handle joint);
X3DDECL float X3DCALL xJointD6GetAngularUpperX(Handle joint);
X3DDECL float X3DCALL xJointD6GetAngularUpperY(Handle joint);
X3DDECL float X3DCALL xJointD6GetAngularUpperZ(Handle joint);
X3DDECL void X3DCALL xJointD6SpringSetParam(Handle joint, int index, int enabled, float damping = 1.0f, float stiffness = 1.0f);
X3DDECL void X3DCALL xJointHingeSetAxis(Handle joint, float x, float y, float z);
X3DDECL void X3DCALL xJointHingeSetLimits(Handle joint, float lowerLimit, float upperLimit, float softness = 0.9f, float biasFactor = 0.3f, float relaxationFactor = 1.0f);
X3DDECL float X3DCALL xJointHingeGetLowerLimit(Handle joint);
X3DDECL float X3DCALL xJointHingeGetUpperLimit(Handle joint);
X3DDECL void X3DCALL xJointEnableMotor(Handle joint, int enabled, float targetVelocity, float maxForce, int index = 0);
X3DDECL void X3DCALL xJointHingeSetMotorTarget(Handle joint, float targetAngle, float deltaTime);
X3DDECL Handle X3DCALL xJointGetEntityA(Handle joint);
X3DDECL Handle X3DCALL xJointGetEntityB(Handle joint);
X3DDECL void X3DCALL xEntityApplyCentralForce(Handle entity, float x, float y, float z, bool isGlobal = true);
X3DDECL void X3DCALL xEntityApplyCentralImpulse(Handle entity, float x, float y, float z, bool isGlobal = true);
X3DDECL void X3DCALL xEntityApplyTorque(Handle entity, float x, float y, float z, bool isGlobal = true);
X3DDECL void X3DCALL xEntityApplyTorqueImpulse(Handle entity, float x, float y, float z, bool isGlobal = true);
X3DDECL void X3DCALL xEntityApplyForce(Handle entity, float x, float y, float z, float pointx, float pointy, float pointz, bool isGlobal = true, bool globalPoint = true);
X3DDECL void X3DCALL xEntityApplyImpulse(Handle entity, float x, float y, float z, float pointx, float pointy, float pointz, bool isGlobal = true, bool globalPoint = true);
X3DDECL void X3DCALL xEntityReleaseForces(Handle entity);
X3DDECL void X3DCALL xWorldSetGravity(float x, float y, float z, Handle world = NULL);
X3DDECL float X3DCALL xWorldGetGravityX(Handle world = NULL);
X3DDECL float X3DCALL xWorldGetGravityY(Handle world = NULL);
X3DDECL float X3DCALL xWorldGetGravityZ(Handle world = NULL);
X3DDECL void X3DCALL xEntitySetGravity(Handle entity, float x, float y, float z);
X3DDECL float X3DCALL xEntityGetGravityX(Handle entity);
X3DDECL float X3DCALL xEntityGetGravityY(Handle entity);
X3DDECL float X3DCALL xEntityGetGravityZ(Handle entity);
X3DDECL void X3DCALL xEntitySetLinearVelocity(Handle entity, float x, float y, float z, bool isGlobal = true);
X3DDECL float X3DCALL xEntityGetLinearVelocityX(Handle entity, bool isGlobal = true);
X3DDECL float X3DCALL xEntityGetLinearVelocityY(Handle entity, bool isGlobal = true);
X3DDECL float X3DCALL xEntityGetLinearVelocityZ(Handle entity, bool isGlobal = true);
X3DDECL void X3DCALL xEntitySetAngularVelocity(Handle entity, float x, float y, float z, bool isGlobal = true);
X3DDECL float X3DCALL xEntityGetAngularVelocityX(Handle entity, bool isGlobal = true);
X3DDECL float X3DCALL xEntityGetAngularVelocityY(Handle entity, bool isGlobal = true);
X3DDECL float X3DCALL xEntityGetAngularVelocityZ(Handle entity, bool isGlobal = true);
X3DDECL void X3DCALL xEntitySetDamping(Handle entity, float linear, float angular);
X3DDECL float X3DCALL xEntityGetLinearDamping(Handle entity);
X3DDECL float X3DCALL xEntityGetAngularDamping(Handle entity);
X3DDECL void X3DCALL xEntitySetFriction(Handle entity, float friction);
X3DDECL float X3DCALL xEntityGetFriction(Handle entity);
X3DDECL void X3DCALL xEntitySetAnisotropicFriction(Handle entity, float fx, float fy, float fz);
X3DDECL float X3DCALL xEntityGetAnisotropicFrictionX(Handle entity);
X3DDECL float X3DCALL xEntityGetAnisotropicFrictionY(Handle entity);
X3DDECL float X3DCALL xEntityGetAnisotropicFrictionZ(Handle entity);
X3DDECL void X3DCALL xEntitySetLinearFactor(Handle entity, float x, float y, float z);
X3DDECL float X3DCALL xEntityGetLinearFactorX(Handle entity);
X3DDECL float X3DCALL xEntityGetLinearFactorY(Handle entity);
X3DDECL float X3DCALL xEntityGetLinearFactorZ(Handle entity);
X3DDECL void X3DCALL xEntitySetAngularFactor(Handle entity, float x, float y, float z);
X3DDECL float X3DCALL xEntityGetAngularFactorX(Handle entity);
X3DDECL float X3DCALL xEntityGetAngularFactorY(Handle entity);
X3DDECL float X3DCALL xEntityGetAngularFactorZ(Handle entity);
X3DDECL void X3DCALL xEntitySetRestitution(Handle entity, float restitution);
X3DDECL float X3DCALL xEntityGetRestitution(Handle entity);
X3DDECL void X3DCALL xEntitySetMass(Handle entity, float mass);
X3DDECL float X3DCALL xEntityGetMass(Handle entity);
X3DDECL int X3DCALL xEntityCountContacts(Handle entity);
X3DDECL float X3DCALL xEntityGetContactX(Handle entity, int index);
X3DDECL float X3DCALL xEntityGetContactY(Handle entity, int index);
X3DDECL float X3DCALL xEntityGetContactZ(Handle entity, int index);
X3DDECL float X3DCALL xEntityGetContactNX(Handle entity, int index);
X3DDECL float X3DCALL xEntityGetContactNY(Handle entity, int index);
X3DDECL float X3DCALL xEntityGetContactNZ(Handle entity, int index);
X3DDECL float X3DCALL xEntityGetContactDistance(Handle entity, int index);
X3DDECL Handle X3DCALL xEntityGetContact(Handle entity, int index);
X3DDECL float X3DCALL xEntityGetContactImpulse(Handle entity, int index);
X3DDECL void X3DCALL xEntitySetCollisionGroup(Handle entity, int group);
X3DDECL int X3DCALL xEntityGetCollisionGroup(Handle entity);
X3DDECL void X3DCALL xEntitySetContactGroup(Handle entity, int group);
X3DDECL int X3DCALL xEntityGetContactGroup(Handle entity);
X3DDECL void X3DCALL xEntitySetRaycastGroup(Handle entity, int group);
X3DDECL int X3DCALL xEntityGetRaycastGroup(Handle entity);
X3DDECL void X3DCALL xPhysicsSetCollisionFilter(int group0, int group1, int state);
X3DDECL int X3DCALL xPhysicsGetCollisionFilter(int group0, int group1);
X3DDECL void X3DCALL xPhysicsSetContactFilter(int group0, int group1, int state);
X3DDECL int X3DCALL xPhysicsGetContactFilter(int group0, int group1);
X3DDECL void X3DCALL xPhysicsSetRaycastFilter(int rayGroup, int bodyGroup, int state);
X3DDECL int X3DCALL xPhysicsGetRaycastFilter(int rayGroup, int bodyGroup);
X3DDECL int X3DCALL xEntityIsSleeping(Handle entity);
X3DDECL void X3DCALL xEntityDisableSleeping(Handle entity, int state = 1);
X3DDECL void X3DCALL xEntityWakeUp(Handle entity);
X3DDECL void X3DCALL xEntitySleep(Handle entity);
X3DDECL void X3DCALL xEntitySetSleepingThresholds(Handle entity, float linearThreshold, float angularThreshold);
X3DDECL float X3DCALL xEntityGetLinearSleepingThreshold(Handle entity);
X3DDECL float X3DCALL xEntityGetAngularSleepingThreshold(Handle entity);
X3DDECL void X3DCALL xPhysicsRayCast(float fromX, float fromY, float fromZ, float toX, float toY, float toZ, int rcType = 0, int rayGroup = 0);
X3DDECL Handle X3DCALL xPhysicsGetHitEntity(int index = 0);
X3DDECL float X3DCALL xPhysicsGetHitPointX(int index = 0);
X3DDECL float X3DCALL xPhysicsGetHitPointY(int index = 0);
X3DDECL float X3DCALL xPhysicsGetHitPointZ(int index = 0);
X3DDECL float X3DCALL xPhysicsGetHitNormalX(int index = 0);
X3DDECL float X3DCALL xPhysicsGetHitNormalY(int index = 0);
X3DDECL float X3DCALL xPhysicsGetHitNormalZ(int index = 0);
X3DDECL float X3DCALL xPhysicsGetHitDistance(int index = 0);
X3DDECL int X3DCALL xPhysicsCountHits();
X3DDECL void X3DCALL xEntityBodyLocalPosition(Handle entity, float x, float y, float z);
X3DDECL void X3DCALL xEntityBodyLocalRotation(Handle entity, float pitch, float yaw, float roll);
X3DDECL void X3DCALL xEntityBodyLocalScale(Handle entity, float x, float y, float z);
X3DDECL void X3DCALL xWorldSetFrequency(float frequency, Handle world = NULL);
X3DDECL void X3DCALL xEntityMakeKinematic(Handle entity, int state);
X3DDECL int X3DCALL xEntityIsKinematic(Handle entity);
X3DDECL void X3DCALL xPhysicsDebugRender(int state);
X3DDECL void X3DCALL xEntityDisableSimulation(Handle entity, int state);
X3DDECL int X3DCALL xEntityHasBody(Handle entity);
X3DDECL void X3DCALL xEntityCreateVehicle(Handle chassisEntity);
X3DDECL void X3DCALL xEntityFreeVehicle(Handle chassisEntity);
X3DDECL int X3DCALL xEntityCountWheels(Handle chassisEntity);
X3DDECL int X3DCALL xEntityAddWheel(Handle chassisEntity, Handle wheelEntity);
X3DDECL void X3DCALL xEntityWheelSetRadius(Handle chassisEntity, int index, float radius);
X3DDECL void X3DCALL xEntityWheelSetAxle(Handle chassisEntity, int index, float x, float y, float z);
X3DDECL void X3DCALL xEntityWheelSetRay(Handle chassisEntity, int index, float x, float y, float z);
X3DDECL void X3DCALL xEntityWheelSetSuspensionLength(Handle chassisEntity, int index, float length);
X3DDECL void X3DCALL xEntityWheelSetBrake(Handle chassisEntity, int index, float brake);
X3DDECL void X3DCALL xEntityWheelSetMaxSuspensionForce(Handle chassisEntity, int index, float force);
X3DDECL void X3DCALL xEntityWheelSetMaxSuspensionTravel(Handle chassisEntity, int index, float travel);
X3DDECL void X3DCALL xEntityWheelSetSuspensionStiffness(Handle chassisEntity, int index, float stiffness);
X3DDECL void X3DCALL xEntityWheelSetSuspensionDamping(Handle chassisEntity, int index, float damping);
X3DDECL void X3DCALL xEntityWheelSetSuspensionCompression(Handle chassisEntity, int index, float compression);
X3DDECL void X3DCALL xEntityWheelSetFriction(Handle chassisEntity, int index, float friction);
X3DDECL void X3DCALL xEntityWheelSetEngineForce(Handle chassisEntity, int index, float force);
X3DDECL void X3DCALL xEntityWheelSetRollInfluence(Handle chassisEntity, int index, float roll);
X3DDECL void X3DCALL xEntityWheelSetRotation(Handle chassisEntity, int index, float rotation);
X3DDECL void X3DCALL xEntityWheelSetSteering(Handle chassisEntity, int index, float steering);
X3DDECL void X3DCALL xEntityWheelSetConnectionPoint(Handle chassisEntity, int index, float x, float y, float z, bool isGlobal = false);
X3DDECL float X3DCALL xEntityWheelGetSuspensionLength(Handle chassisEntity, int index);
X3DDECL float X3DCALL xEntityWheelGetPitch(Handle chassisEntity, int index);
X3DDECL float X3DCALL xEntityWheelGetYaw(Handle chassisEntity, int index);
X3DDECL float X3DCALL xEntityWheelGetRoll(Handle chassisEntity, int index);
X3DDECL Handle X3DCALL xEntityWheelGetContactEntity(Handle chassisEntity, int index);

// posteffects commands
X3DDECL Handle X3DCALL xLoadPostEffect(const char * path);
X3DDECL void X3DCALL xFreePostEffect(Handle postEffect);
X3DDECL void X3DCALL xSetPostEffect(int index, Handle postEffect, const char * technique = "MainTechnique");
X3DDECL void X3DCALL xRenderPostEffects();
X3DDECL void X3DCALL xSetPostEffectInt(Handle postEffect, const char * name, int value);
X3DDECL void X3DCALL xSetPostEffectFloat(Handle postEffect, const char * name, float value);
X3DDECL void X3DCALL xSetPostEffectBool(Handle postEffect, const char * name, bool value);
X3DDECL void X3DCALL xSetPostEffectVector(Handle postEffect, const char * name, float x, float y, float z, float w = 1.0f);
X3DDECL void X3DCALL xSetPostEffectTexture(Handle postEffect, const char * name, Handle texture, int frame = 0);
X3DDECL void X3DCALL xDeletePostEffectConstant(Handle postEffect, const char * name);
X3DDECL void X3DCALL xClearPostEffectConstants(Handle postEffect);

// psystems commands
X3DDECL Handle X3DCALL xCreatePSystem(bool pointSprites = false);
X3DDECL int X3DCALL xPSystemType(Handle psystem);
X3DDECL void X3DCALL xPSystemSetBlend(Handle psystem, int mode);
X3DDECL int X3DCALL xPSystemGetBlend(Handle psystem);
X3DDECL void X3DCALL xPSystemSetMaxParticles(Handle psystem, int maxNumber);
X3DDECL int X3DCALL xPSystemGetMaxParticles(Handle psystem);
X3DDECL void X3DCALL xPSystemSetEmitterLifetime(Handle psystem, int lifetime);
X3DDECL int X3DCALL xPSystemGetEmitterLifetime(Handle psystem);
X3DDECL void X3DCALL xPSystemSetParticleLifetime(Handle psystem, int lifetime);
X3DDECL int X3DCALL xPSystemGetParticleLifetime(Handle psystem);
X3DDECL void X3DCALL xPSystemSetCreationInterval(Handle psystem, int interval);
X3DDECL int X3DCALL xPSystemGetCreationInterval(Handle psystem);
X3DDECL void X3DCALL xPSystemSetCreationFrequency(Handle psystem, int frequency);
X3DDECL int X3DCALL xPSystemGetCreationFrequency(Handle psystem);
X3DDECL void X3DCALL xPSystemSetTexture(Handle psystem, Handle texture, int frames, float speed);
X3DDECL Handle X3DCALL xPSystemGetTexture(Handle psystem);
X3DDECL int X3DCALL xPSystemGetTextureFrames(Handle psystem);
X3DDECL int X3DCALL xPSystemGetTextureAnimationSpeed(Handle psystem);
X3DDECL void X3DCALL xPSystemSetOffset(Handle psystem, float minx, float miny, float minz, float maxx, float maxy, float maxz);
X3DDECL float X3DCALL xPSystemGetOffsetMinX(Handle psystem);
X3DDECL float X3DCALL xPSystemGetOffsetMinY(Handle psystem);
X3DDECL float X3DCALL xPSystemGetOffsetMinZ(Handle psystem);
X3DDECL float X3DCALL xPSystemGetOffsetMaxX(Handle psystem);
X3DDECL float X3DCALL xPSystemGetOffsetMaxY(Handle psystem);
X3DDECL float X3DCALL xPSystemGetOffsetMaxZ(Handle psystem);
X3DDECL void X3DCALL xPSystemSetVelocity(Handle psystem, float minx, float miny, float minz, float maxx, float maxy, float maxz);
X3DDECL float X3DCALL xPSystemGetVelocityMinX(Handle psystem);
X3DDECL float X3DCALL xPSystemGetVelocityMinY(Handle psystem);
X3DDECL float X3DCALL xPSystemGetVelocityMinZ(Handle psystem);
X3DDECL float X3DCALL xPSystemGetVelocityMaxX(Handle psystem);
X3DDECL float X3DCALL xPSystemGetVelocityMaxY(Handle psystem);
X3DDECL float X3DCALL xPSystemGetVelocityMaxZ(Handle psystem);
X3DDECL void X3DCALL xPSystemEnableFixedQuads(Handle psystem, bool state);
X3DDECL int X3DCALL xPSystemFixedQuadsUsed(Handle psystem);
X3DDECL void X3DCALL xPSystemSetTorque(Handle psystem, float minx, float miny, float minz, float maxx, float maxy, float maxz);
X3DDECL float X3DCALL xPSystemGetTorqueMinX(Handle psystem);
X3DDECL float X3DCALL xPSystemGetTorqueMinY(Handle psystem);
X3DDECL float X3DCALL xPSystemGetTorqueMinZ(Handle psystem);
X3DDECL float X3DCALL xPSystemGetTorqueMaxX(Handle psystem);
X3DDECL float X3DCALL xPSystemGetTorqueMaxY(Handle psystem);
X3DDECL float X3DCALL xPSystemGetTorqueMaxZ(Handle psystem);
X3DDECL void X3DCALL xPSystemSetGravity(Handle psystem, float gravity);
X3DDECL float X3DCALL xPSystemGetGravity(Handle psystem);
X3DDECL void X3DCALL xPSystemSetAlpha(Handle psystem, float alpha);
X3DDECL float X3DCALL xPSystemGetAlpha(Handle psystem);
X3DDECL void X3DCALL xPSystemSetFadeSpeed(Handle psystem, float speed);
X3DDECL float X3DCALL xPSystemGetFadeSpeed(Handle psystem);
X3DDECL void X3DCALL xPSystemSetParticleSize(Handle psystem, float minx, float miny, float maxx, float maxy);
X3DDECL float X3DCALL xPSystemGetSizeMinX(Handle psystem);
X3DDECL float X3DCALL xPSystemGetSizeMinY(Handle psystem);
X3DDECL float X3DCALL xPSystemGetSizeMaxX(Handle psystem);
X3DDECL float X3DCALL xPSystemGetSizeMaxY(Handle psystem);
X3DDECL void X3DCALL xPSystemSetScaleSpeed(Handle psystem, float minx, float miny, float maxx, float maxy);
X3DDECL float X3DCALL xPSystemGetScaleSpeedMinX(Handle psystem);
X3DDECL float X3DCALL xPSystemGetScaleSpeedMinY(Handle psystem);
X3DDECL float X3DCALL xPSystemGetScaleSpeedMaxX(Handle psystem);
X3DDECL float X3DCALL xPSystemGetScaleSpeedMaxY(Handle psystem);
X3DDECL void X3DCALL xPSystemSetAngles(Handle psystem, float minx, float miny, float minz, float maxx, float maxy, float maxz);
X3DDECL float X3DCALL xPSystemGetAnglesMinX(Handle psystem);
X3DDECL float X3DCALL xPSystemGetAnglesMinY(Handle psystem);
X3DDECL float X3DCALL xPSystemGetAnglesMinZ(Handle psystem);
X3DDECL float X3DCALL xPSystemGetAnglesMaxX(Handle psystem);
X3DDECL float X3DCALL xPSystemGetAnglesMaxY(Handle psystem);
X3DDECL float X3DCALL xPSystemGetAnglesMaxZ(Handle psystem);
X3DDECL void X3DCALL xPSystemSetColorMode(Handle psystem, int mode);
X3DDECL int X3DCALL xPSystemGetColorMode(Handle psystem);
X3DDECL void X3DCALL xPSystemSetColors(Handle psystem, float sred, float sgreen, float sblue, float ered, float egreen, float eblue);
X3DDECL float X3DCALL xPSystemGetBeginColorRed(Handle psystem);
X3DDECL float X3DCALL xPSystemGetBeginColorGreen(Handle psystem);
X3DDECL float X3DCALL xPSystemGetBeginColorBlue(Handle psystem);
X3DDECL float X3DCALL xPSystemGetEndColorRed(Handle psystem);
X3DDECL float X3DCALL xPSystemGetEndColorGreen(Handle psystem);
X3DDECL float X3DCALL xPSystemGetEndColorBlue(Handle psystem);
X3DDECL void X3DCALL xFreePSystem(Handle psystem);
X3DDECL void X3DCALL xPSystemSetParticleParenting(Handle psystem, bool mode);
X3DDECL int X3DCALL xPSystemGetParticleParenting(Handle psystem);

// raypicks commands
X3DDECL Handle X3DCALL xLinePick(float x, float y, float z, float dx, float dy, float dz, float distance = 0.0f);
X3DDECL Handle X3DCALL xEntityPick(Handle entity, float range = 0.0f);
X3DDECL Handle X3DCALL xCameraPick(Handle camera, int x, int y);
X3DDECL float X3DCALL xPickedNX();
X3DDECL float X3DCALL xPickedNY();
X3DDECL float X3DCALL xPickedNZ();
X3DDECL float X3DCALL xPickedX();
X3DDECL float X3DCALL xPickedY();
X3DDECL float X3DCALL xPickedZ();
X3DDECL Handle X3DCALL xPickedEntity();
X3DDECL Handle X3DCALL xPickedSurface();
X3DDECL int X3DCALL xPickedTriangle();
X3DDECL int X3DCALL xPickedTime();

// shadows commands
X3DDECL void X3DCALL xSetShadowsBlur(int blurLevel);
X3DDECL void X3DCALL xSetShadowShader(const char * path);
X3DDECL Handle X3DCALL xInitShadows(int dirSize, int spotSize, int pointSize);
X3DDECL void X3DCALL xSetShadowParams(int splitPlanes = 4, float splitLambda = 0.95f, bool useOrtho = true, float lightDist = 300.0f);
X3DDECL void X3DCALL xRenderShadows(Handle mainCamera, Handle texture);
X3DDECL void X3DCALL xShadowPriority(int priority);
X3DDECL void X3DCALL xCameraDisableShadows(Handle camera);
X3DDECL void X3DCALL xCameraEnableShadows(Handle camera);
X3DDECL void X3DCALL xEntityCastShadows(Handle entity, Handle light, bool state);
X3DDECL void X3DCALL xEntityReceiveShadows(Handle entity, Handle light, bool state);
X3DDECL int X3DCALL xEntityIsCaster(Handle entity, Handle light);
X3DDECL int X3DCALL xEntityIsReceiver(Handle entity, Handle light);

// sounds commands
X3DDECL Handle X3DCALL xLoadSound(const char * path);
X3DDECL Handle X3DCALL xLoad3DSound(const char * path);
X3DDECL void X3DCALL xFreeSound(Handle sound);
X3DDECL void X3DCALL xLoopSound(Handle sound);
X3DDECL void X3DCALL xSoundPitch(Handle sound, int pitch);
X3DDECL void X3DCALL xSoundVolume(Handle sound, float volume);
X3DDECL void X3DCALL xSoundPan(Handle sound, float pan);
X3DDECL int X3DCALL xPlaySound(Handle sound);
X3DDECL void X3DCALL xStopChannel(int channel);
X3DDECL void X3DCALL xPauseChannel(int channel);
X3DDECL void X3DCALL xResumeChannel(int channel);
X3DDECL int X3DCALL xPlayMusic(const char * path);
X3DDECL void X3DCALL xChannelPitch(int channel, int pitch);
X3DDECL void X3DCALL xChannelVolume(int channel, float volume);
X3DDECL void X3DCALL xChannelPan(int channel, float pan);
X3DDECL int X3DCALL xChannelPlaying(int channel);
X3DDECL int X3DCALL xEmitSound(Handle sound, Handle entity);
X3DDECL Handle X3DCALL xCreateListener(Handle parent = NULL, float roFactor = 1.0f, float doplerFactor = 1.0f, float distFactor = 1.0f);
X3DDECL Handle X3DCALL xGetListener();
X3DDECL int X3DCALL xInitalizeSound();

// sprites commands
X3DDECL Handle X3DCALL xCreateSprite(Handle parent = NULL);
X3DDECL void X3DCALL xSpriteViewMode(Handle sprite, int mode);
X3DDECL void X3DCALL xHandleSprite(Handle sprite, float x, float y);
X3DDECL Handle X3DCALL xLoadSprite(const char * path, int flags = 9, Handle parent = NULL);
X3DDECL void X3DCALL xRotateSprite(Handle sprite, float angle);
X3DDECL void X3DCALL xScaleSprite(Handle sprite, float xScale, float yScale);

// surfaces commands
X3DDECL Handle X3DCALL xCreateSurface(Handle entity, Handle brush = NULL, bool dynamic = false);
X3DDECL Handle X3DCALL xGetSurfaceBrush(Handle surface);
X3DDECL int X3DCALL xAddVertex(Handle surface, float x, float y, float z, float u = 0.0f, float v = 0.0f, float w = 0.0f);
X3DDECL int X3DCALL xAddTriangle(Handle surface, int v0, int v1, int v2);
X3DDECL void X3DCALL xSetSurfaceFrustumSphere(Handle surface, float x, float y, float z, float radii);
X3DDECL void X3DCALL xVertexCoords(Handle surface, int vertex, float x, float y, float z);
X3DDECL void X3DCALL xVertexNormal(Handle surface, int vertex, float x, float y, float z);
X3DDECL void X3DCALL xVertexTangent(Handle surface, int vertex, float x, float y, float z);
X3DDECL void X3DCALL xVertexBinormal(Handle surface, int vertex, float x, float y, float z);
X3DDECL void X3DCALL xVertexColor(Handle surface, int vertex, int red, int green, int blue, float alpha = 1.0f);
X3DDECL void X3DCALL xVertexTexCoords(Handle surface, int vertex, float u, float v, float w = 1.0f, int textureSet = 0);
X3DDECL int X3DCALL xCountVertices(Handle surface);
X3DDECL float X3DCALL xVertexX(Handle surface, int vertex);
X3DDECL float X3DCALL xVertexY(Handle surface, int vertex);
X3DDECL float X3DCALL xVertexZ(Handle surface, int vertex);
X3DDECL float X3DCALL xVertexNX(Handle surface, int vertex);
X3DDECL float X3DCALL xVertexNY(Handle surface, int vertex);
X3DDECL float X3DCALL xVertexNZ(Handle surface, int vertex);
X3DDECL float X3DCALL xVertexTX(Handle surface, int vertex);
X3DDECL float X3DCALL xVertexTY(Handle surface, int vertex);
X3DDECL float X3DCALL xVertexTZ(Handle surface, int vertex);
X3DDECL float X3DCALL xVertexBX(Handle surface, int vertex);
X3DDECL float X3DCALL xVertexBY(Handle surface, int vertex);
X3DDECL float X3DCALL xVertexBZ(Handle surface, int vertex);
X3DDECL float X3DCALL xVertexU(Handle surface, int vertex, int textureSet = 0);
X3DDECL float X3DCALL xVertexV(Handle surface, int vertex, int textureSet = 0);
X3DDECL float X3DCALL xVertexW(Handle surface, int vertex, int textureSet = 0);
X3DDECL float X3DCALL xVertexRed(Handle surface, int vertex);
X3DDECL float X3DCALL xVertexGreen(Handle surface, int vertex);
X3DDECL float X3DCALL xVertexBlue(Handle surface, int vertex);
X3DDECL float X3DCALL xVertexAlpha(Handle surface, int vertex);
X3DDECL int X3DCALL xTriangleVertex(Handle surface, int triangle, int corner);
X3DDECL int X3DCALL xCountTriangles(Handle surface);
X3DDECL void X3DCALL xPaintSurface(Handle surface, Handle brush);
X3DDECL void X3DCALL xClearSurface(Handle surface, bool vertices = true, bool triangles = true);
X3DDECL Handle X3DCALL xGetSurfaceTexture(Handle surface, int index = 0);
X3DDECL void X3DCALL xFreeSurface(Handle surface);
X3DDECL void X3DCALL xSurfacePrimitiveType(Handle surface, int ptype);
X3DDECL void X3DCALL xSurfaceTexture(Handle surface, Handle texture, int frame, int index);
X3DDECL void X3DCALL xSurfaceColor(Handle surface, int red, int green, int blue);
X3DDECL void X3DCALL xSurfaceAlpha(Handle surface, float alpha);
X3DDECL void X3DCALL xSurfaceShininess(Handle surface, float shininess);
X3DDECL void X3DCALL xSurfaceBlend(Handle surface, int blendMode);
X3DDECL void X3DCALL xSurfaceFX(Handle surface, int fxFlags);
X3DDECL void X3DCALL xSurfaceAlphaRef(Handle surface, int alphaRef);
X3DDECL void X3DCALL xSurfaceAlphaFunc(Handle surface, int alphaFunc);

// sysinfos commands
X3DDECL const char * X3DCALL xCPUName();
X3DDECL const char * X3DCALL xCPUVendor();
X3DDECL int X3DCALL xCPUFamily();
X3DDECL int X3DCALL xCPUModel();
X3DDECL int X3DCALL xCPUStepping();
X3DDECL DWORD X3DCALL xCPUSpeed();
X3DDECL const char * X3DCALL xVideoInfo();
X3DDECL float X3DCALL xVideoAspectRatio();
X3DDECL const char * X3DCALL xVideoAspectRatioStr();
X3DDECL float X3DCALL xGetTotalPhysMem();
X3DDECL float X3DCALL xGetAvailPhysMem();
X3DDECL float X3DCALL xGetTotalPageMem();
X3DDECL float X3DCALL xGetAvailPageMem();
X3DDECL float X3DCALL xGetTotalVidMem();
X3DDECL float X3DCALL xGetAvailVidMem();
X3DDECL float X3DCALL xGetTotalVidLocalMem();
X3DDECL float X3DCALL xGetAvailVidLocalMem();
X3DDECL float X3DCALL xGetTotalVidNonlocalMem();
X3DDECL float X3DCALL xGetAvailVidNonlocalMem();
X3DDECL const char * X3DCALL xGetXors3dVersion();
X3DDECL int X3DCALL xGetXors3dMajorVersion();
X3DDECL int X3DCALL xGetXors3dMinorVersion();
X3DDECL int X3DCALL xGetXors3dRevision();

// terrains commands
X3DDECL Handle X3DCALL xLoadTerrain(const char * path, Handle parent = NULL);
X3DDECL Handle X3DCALL xCreateTerrain(int size, Handle parent = NULL);
X3DDECL void X3DCALL xTerrainShading(Handle terrain, bool state = false);
X3DDECL float X3DCALL xTerrainHeight(Handle terrain, int x, int y);
X3DDECL int X3DCALL xTerrainSize(Handle terrain);
X3DDECL float X3DCALL xTerrainX(Handle terrain, float x, float y, float z);
X3DDECL float X3DCALL xTerrainY(Handle terrain, float x, float y, float z);
X3DDECL float X3DCALL xTerrainZ(Handle terrain, float x, float y, float z);
X3DDECL void X3DCALL xModifyTerrain(Handle terrain, int x, int y, float height, bool realtime = false);
X3DDECL void X3DCALL xTerrainDetail(Handle terrain, int detail);
X3DDECL void X3DCALL xTerrainSplatting(Handle terrain, bool state);
X3DDECL Handle X3DCALL xLoadTerrainTexture(const char * path);
X3DDECL void X3DCALL xFreeTerrainTexture(Handle texture);
X3DDECL void X3DCALL xTerrainTextureLightmap(Handle texture, bool state);
X3DDECL void X3DCALL xTerrainTexture(Handle terrain, Handle texture);
X3DDECL void X3DCALL xTerrainViewZone(Handle terrain, int viewZone, int texturingZone = -1);
X3DDECL void X3DCALL xTerrainLODs(int lodsCount);

// textures commands
X3DDECL int X3DCALL xTextureWidth(Handle texture);
X3DDECL int X3DCALL xTextureHeight(Handle texture);
X3DDECL Handle X3DCALL xCreateTexture(int width, int height, int flags = 9, int frames = 1);
X3DDECL void X3DCALL xFreeTexture(Handle texture);
X3DDECL void X3DCALL xSetTextureFilter(Handle texture, int mode);
X3DDECL void X3DCALL xTextureBlend(Handle texture, int blend);
X3DDECL void X3DCALL xTextureCoords(Handle texture, int coords);
X3DDECL void X3DCALL xTextureFilter(const char * matchText, int flags);
X3DDECL void X3DCALL xClearTextureFilters();
X3DDECL Handle X3DCALL xLoadTexture(const char * path, int flags = 9);
X3DDECL const char * X3DCALL xTextureName(Handle texture);
X3DDECL void X3DCALL xPositionTexture(Handle texture, float x, float y);
X3DDECL void X3DCALL xScaleTexture(Handle texture, float x, float y);
X3DDECL void X3DCALL xRotateTexture(Handle texture, float angle);
X3DDECL Handle X3DCALL xLoadAnimTexture(const char * path, int flags, int width, int height, int startFrame, int frames);
X3DDECL Handle X3DCALL xCreateTextureFromData(Handle pixelsData, int width, int height, int flags = 9, int frames = 1);
X3DDECL Handle X3DCALL xGetTextureData(Handle texture, int frame = 0);
X3DDECL int X3DCALL xGetTextureDataPitch(Handle texture, int frame = 0);
X3DDECL Handle X3DCALL xGetTextureSurface(Handle texture, int frame = 0);
X3DDECL int X3DCALL xGetTextureFrames(Handle texture);
X3DDECL void X3DCALL xSetCubeFace(Handle texture, int face);
X3DDECL void X3DCALL xSetCubeMode(Handle texture, int mode);
X3DDECL int X3DCALL xGetTextureBlend(Handle texture);
X3DDECL float X3DCALL xGetTextureX(Handle texture);
X3DDECL float X3DCALL xGetTextureY(Handle texture);
X3DDECL float X3DCALL xGetTextureScaleX(Handle texture);
X3DDECL float X3DCALL xGetTextureScaleY(Handle texture);
X3DDECL float X3DCALL xGetTextureAngle(Handle texture);
X3DDECL int X3DCALL xGetTextureCoords(Handle texture);
X3DDECL int X3DCALL xGetCubeFace(Handle texture);
X3DDECL int X3DCALL xGetCubeMode(Handle texture);
X3DDECL int X3DCALL xGetTextureFlags(Handle texture);
X3DDECL void X3DCALL xSetTextureFlags(Handle texture, int flags);
X3DDECL int X3DCALL xTextureCounter(Handle texture);

// transforms commands
X3DDECL float X3DCALL xVectorPitch(float x, float y, float z);
X3DDECL float X3DCALL xVectorYaw(float x, float y, float z);
X3DDECL float X3DCALL xDeltaPitch(Handle entity1, Handle entity2);
X3DDECL float X3DCALL xDeltaYaw(Handle entity1, Handle entity2);
X3DDECL float X3DCALL xTFormedX();
X3DDECL float X3DCALL xTFormedY();
X3DDECL float X3DCALL xTFormedZ();
X3DDECL void X3DCALL xTFormPoint(float x, float y, float z, Handle source, Handle destination);
X3DDECL void X3DCALL xTFormVector(float x, float y, float z, Handle source, Handle destination);
X3DDECL void X3DCALL xTFormNormal(float x, float y, float z, Handle source, Handle destination);

// videos commands
X3DDECL Handle X3DCALL xOpenMovie(const char * path);
X3DDECL void X3DCALL xCloseMovie(Handle video);
X3DDECL void X3DCALL xDrawMovie(Handle video, int x = 0, int y = 0, int width = -1, int height = -1);
X3DDECL int X3DCALL xMovieWidth(Handle video);
X3DDECL int X3DCALL xMovieHeight(Handle video);
X3DDECL int X3DCALL xMoviePlaying(Handle video);
X3DDECL void X3DCALL xMovieSeek(Handle video, float time, bool relative = false);
X3DDECL float X3DCALL xMovieLength(Handle video);
X3DDECL float X3DCALL xMovieCurrentTime(Handle video);
X3DDECL void X3DCALL xMoviePause(Handle video);
X3DDECL void X3DCALL xMovieResume(Handle video);
X3DDECL Handle X3DCALL xMovieTexture(Handle video);

// worlds commands
X3DDECL Handle X3DCALL xCreateWorld();
X3DDECL void X3DCALL xSetActiveWorld(Handle world);
X3DDECL Handle X3DCALL xGetActiveWorld();
X3DDECL Handle X3DCALL xGetDefaultWorld();
X3DDECL void X3DCALL xDeleteWorld(Handle world);

// Scancodes for keyboard and mouse
const int MOUSE_LEFT         = 1;
const int MOUSE_RIGHT        = 2;
const int MOUSE_MIDDLE       = 3;
const int MOUSE4             = 4;
const int MOUSE5             = 5;
const int MOUSE6             = 6;
const int MOUSE7             = 7;
const int MOUSE8             = 8;

const int xMOUSE_LEFT        = 1;
const int xMOUSE_RIGHT       = 2;
const int xMOUSE_MIDDLE      = 3;
const int xMOUSE4            = 4;
const int xMOUSE5            = 5;
const int xMOUSE6            = 6;
const int xMOUSE7            = 7;
const int xMOUSE8            = 8;

const int KEY_ESCAPE         = 1;
const int KEY_1              = 2;
const int KEY_2              = 3;
const int KEY_3              = 4;
const int KEY_4              = 5;
const int KEY_5              = 6;
const int KEY_6              = 7;
const int KEY_7              = 8;
const int KEY_8              = 9;
const int KEY_9              = 10;
const int KEY_0              = 11;
const int KEY_MINUS          = 12;
const int KEY_EQUALS         = 13;
const int KEY_BACK           = 14;
const int KEY_TAB            = 15;
const int KEY_Q              = 16;
const int KEY_W              = 17;
const int KEY_E              = 18;
const int KEY_R              = 19;
const int KEY_T              = 20;
const int KEY_Y              = 21;
const int KEY_U              = 22;
const int KEY_I              = 23;
const int KEY_O              = 24;
const int KEY_P              = 25;
const int KEY_LBRACKET       = 26;
const int KEY_RBRACKET       = 27;
const int KEY_RETURN         = 28;
const int KEY_ENTER          = KEY_RETURN;
const int KEY_LCONTROL       = 29;
const int KEY_RCONTROL       = 157;
const int KEY_A              = 30;
const int KEY_S              = 31;
const int KEY_D              = 32;
const int KEY_F              = 33;
const int KEY_G              = 34;
const int KEY_H              = 35;
const int KEY_J              = 36;
const int KEY_K              = 37;
const int KEY_L              = 38;
const int KEY_SEMICOLON      = 39;
const int KEY_APOSTROPHE     = 40;
const int KEY_GRAVE          = 41;
const int KEY_LSHIFT         = 42;
const int KEY_BACKSLASH      = 43;
const int KEY_Z              = 44;
const int KEY_X              = 45;
const int KEY_C              = 46;
const int KEY_V              = 47;
const int KEY_B              = 48;
const int KEY_N              = 49;
const int KEY_M              = 50;
const int KEY_COMMA          = 51;
const int KEY_PERIOD         = 52;
const int KEY_SLASH          = 53;
const int KEY_RSHIFT         = 54;
const int KEY_MULTIPLY       = 55;
const int KEY_MENU           = 56;
const int KEY_SPACE          = 57;
const int KEY_F1             = 59;
const int KEY_F2             = 60;
const int KEY_F3             = 61;
const int KEY_F4             = 62;
const int KEY_F5             = 63;
const int KEY_F6             = 64;
const int KEY_F7             = 65;
const int KEY_F8             = 66;
const int KEY_F9             = 67;
const int KEY_F10            = 68;
const int KEY_NUMLOCK        = 69;
const int KEY_SCROLL         = 70;
const int KEY_NUMPAD7        = 71;
const int KEY_NUMPAD8        = 72;
const int KEY_NUMPAD9        = 73;
const int KEY_SUBTRACT       = 74;
const int KEY_NUMPAD4        = 75;
const int KEY_NUMPAD5        = 76;
const int KEY_NUMPAD6        = 77;
const int KEY_ADD            = 78;
const int KEY_NUMPAD1        = 79;
const int KEY_NUMPAD2        = 80;
const int KEY_NUMPAD3        = 81;
const int KEY_NUMPAD0        = 82;
const int KEY_DECIMAL        = 83;
const int KEY_TILD           = 86;
const int KEY_F11            = 87;
const int KEY_F12            = 88;
const int KEY_NUMPADENTER    = 156;
const int KEY_RMENU          = 221;
const int KEY_PAUSE          = 197;
const int KEY_HOME           = 199;
const int KEY_UP             = 200;
const int KEY_PRIOR          = 201;
const int KEY_LEFT           = 203;
const int KEY_RIGHT          = 205;
const int KEY_END            = 207;
const int KEY_DOWN           = 208;
const int KEY_NEXT           = 209;
const int KEY_INSERT         = 210;
const int KEY_DELETE         = 211;
const int KEY_LWIN           = 219;
const int KEY_RWIN           = 220;
const int KEY_BACKSPACE      = KEY_BACK;
const int KEY_NUMPADSTAR     = KEY_MULTIPLY;
const int KEY_RALT           = 184;
const int KEY_CAPSLOCK       = 58;
const int KEY_NUMPADMINUS    = KEY_SUBTRACT;
const int KEY_NUMPADPLUS     = KEY_ADD;
const int KEY_NUMPADPERIOD   = KEY_DECIMAL;
const int KEY_DIVIDE         = 181;
const int KEY_NUMPADSLASH    = KEY_DIVIDE;
const int KEY_LALT           = 56;
const int KEY_UPARROW        = KEY_UP;
const int KEY_PGUP           = KEY_PRIOR;
const int KEY_LEFTARROW      = KEY_LEFT;
const int KEY_RIGHTARROW     = KEY_RIGHT;
const int KEY_DOWNARROW      = KEY_DOWN;
const int KEY_PGDN           = KEY_NEXT;

const int xKEY_ESCAPE         = 1;
const int xKEY_1              = 2;
const int xKEY_2              = 3;
const int xKEY_3              = 4;
const int xKEY_4              = 5;
const int xKEY_5              = 6;
const int xKEY_6              = 7;
const int xKEY_7              = 8;
const int xKEY_8              = 9;
const int xKEY_9              = 10;
const int xKEY_0              = 11;
const int xKEY_MINUS          = 12;
const int xKEY_EQUALS         = 13;
const int xKEY_BACK           = 14;
const int xKEY_TAB            = 15;
const int xKEY_Q              = 16;
const int xKEY_W              = 17;
const int xKEY_E              = 18;
const int xKEY_R              = 19;
const int xKEY_T              = 20;
const int xKEY_Y              = 21;
const int xKEY_U              = 22;
const int xKEY_I              = 23;
const int xKEY_O              = 24;
const int xKEY_P              = 25;
const int xKEY_LBRACKET       = 26;
const int xKEY_RBRACKET       = 27;
const int xKEY_RETURN         = 28;
const int xKEY_ENTER          = KEY_RETURN;
const int xKEY_LCONTROL       = 29;
const int xKEY_RCONTROL       = 157;
const int xKEY_A              = 30;
const int xKEY_S              = 31;
const int xKEY_D              = 32;
const int xKEY_F              = 33;
const int xKEY_G              = 34;
const int xKEY_H              = 35;
const int xKEY_J              = 36;
const int xKEY_K              = 37;
const int xKEY_L              = 38;
const int xKEY_SEMICOLON      = 39;
const int xKEY_APOSTROPHE     = 40;
const int xKEY_GRAVE          = 41;
const int xKEY_LSHIFT         = 42;
const int xKEY_BACKSLASH      = 43;
const int xKEY_Z              = 44;
const int xKEY_X              = 45;
const int xKEY_C              = 46;
const int xKEY_V              = 47;
const int xKEY_B              = 48;
const int xKEY_N              = 49;
const int xKEY_M              = 50;
const int xKEY_COMMA          = 51;
const int xKEY_PERIOD         = 52;
const int xKEY_SLASH          = 53;
const int xKEY_RSHIFT         = 54;
const int xKEY_MULTIPLY       = 55;
const int xKEY_MENU           = 56;
const int xKEY_SPACE          = 57;
const int xKEY_F1             = 59;
const int xKEY_F2             = 60;
const int xKEY_F3             = 61;
const int xKEY_F4             = 62;
const int xKEY_F5             = 63;
const int xKEY_F6             = 64;
const int xKEY_F7             = 65;
const int xKEY_F8             = 66;
const int xKEY_F9             = 67;
const int xKEY_F10            = 68;
const int xKEY_NUMLOCK        = 69;
const int xKEY_SCROLL         = 70;
const int xKEY_NUMPAD7        = 71;
const int xKEY_NUMPAD8        = 72;
const int xKEY_NUMPAD9        = 73;
const int xKEY_SUBTRACT       = 74;
const int xKEY_NUMPAD4        = 75;
const int xKEY_NUMPAD5        = 76;
const int xKEY_NUMPAD6        = 77;
const int xKEY_ADD            = 78;
const int xKEY_NUMPAD1        = 79;
const int xKEY_NUMPAD2        = 80;
const int xKEY_NUMPAD3        = 81;
const int xKEY_NUMPAD0        = 82;
const int xKEY_DECIMAL        = 83;
const int xKEY_TILD           = 86;
const int xKEY_F11            = 87;
const int xKEY_F12            = 88;
const int xKEY_NUMPADENTER    = 156;
const int xKEY_RMENU          = 221;
const int xKEY_PAUSE          = 197;
const int xKEY_HOME           = 199;
const int xKEY_UP             = 200;
const int xKEY_PRIOR          = 201;
const int xKEY_LEFT           = 203;
const int xKEY_RIGHT          = 205;
const int xKEY_END            = 207;
const int xKEY_DOWN           = 208;
const int xKEY_NEXT           = 209;
const int xKEY_INSERT         = 210;
const int xKEY_DELETE         = 211;
const int xKEY_LWIN           = 219;
const int xKEY_RWIN           = 220;
const int xKEY_BACKSPACE      = KEY_BACK;
const int xKEY_NUMPADSTAR     = KEY_MULTIPLY;
const int xKEY_RALT           = 184;
const int xKEY_CAPSLOCK       = 58;
const int xKEY_NUMPADMINUS    = KEY_SUBTRACT;
const int xKEY_NUMPADPLUS     = KEY_ADD;
const int xKEY_NUMPADPERIOD   = KEY_DECIMAL;
const int xKEY_DIVIDE         = 181;
const int xKEY_NUMPADSLASH    = KEY_DIVIDE;
const int xKEY_LALT           = 56;
const int xKEY_UPARROW        = KEY_UP;
const int xKEY_PGUP           = KEY_PRIOR;
const int xKEY_LEFTARROW      = KEY_LEFT;
const int xKEY_RIGHTARROW     = KEY_RIGHT;
const int xKEY_DOWNARROW      = KEY_DOWN;
const int xKEY_PGDN           = KEY_NEXT;

#endif